[Huawei Developers] Mike-mei:
Question 1​

When my app accesses a material (such as a sticker) for a user, my app displays a message indicating that the access failed due to a network error and prompting the user to try again.

When my app uses an AI capability, the following information was displayed in my app's logs: errorCode:20124 errorMsg:Method not Allowed.

Solution

1. Check whether you have configured your app authentication information. If not, do so by following step 1 in the development guide.

2. Check whether you have enabled Video Editor Kit for your app. If not, enable the service either on HUAWEI Developers or in AppGallery Connect. After the service is enabled, due to factors such as network caches, it will take some time for the service to take effect for your app.

3. Check whether the signing certificate fingerprint in the Android Studio project code of your app is consistent with that configured in AppGallery Connect. If not, or you have not configured the fingerprint in the project code or AppGallery Connect, configure the fingerprint by following the instructions here. After you configure the fingerprint, due to factors such as network caches, it will take some time for the fingerprint to take effect for your app.

4. Check whether you have allocated the material in question.

5. Check whether you have applied for the AI capability you want.

If the problem persists, submit a ticket online (including your detailed logs and app ID) for troubleshooting.

Question 2​

After my app obtains a material column, the column name was either 101 or blank in my app.

Solution

1. Sign in to AppGallery Connect and select your desired project. In the navigation pane on the left, go to Grow > Video Editor Kit > App content operations > Column manager.

View attachment 5933071

2. Click Delete columns.

3. Click Initialize columns.

View attachment 5933073

4. Uninstall and then install the app.

Question 3​

When my app uses the AI filter of the fundamental capability SDK, my app receives no callback, and the Logcat window in Android Studio displays the following information: E/HVEExclusiveFilter: Failed resolution of: Lcom/huawei/hms/videoeditor/ai/imageedit/AIImageEditAnalyzerSetting$Factory;.

Cause

You did not add the dependencies necessary for the AI filter capability.

Solution

Add the following dependencies on the AI filter capability:

// Dependencies on the AI filter capability.
implementation 'com.huawei.hms:video-editor-ai-common:1.9.0.300'
implementation 'com.huawei.hms:video-editor-ai-imageedit:1.3.0.300'
implementation 'com.huawei.hms:video-editor-ai-imageedit-model:1.3.0.300'

View attachment 5933075

Click here for more details.

Question 4​

My app is integrated with the fundamental capability SDK. After a video asset was added to the corresponding lane, my app called getSize or getPosition but obtained a null value.

Cause

When the getSize or getPosition method is called, the calculation of the video position in the preview area is not completed.

Solution

After adding a video asset to the lane, call seekTimeLine of HuaweiVideoEditor to begin calculation of the video position in the preview area. Calling seekTimeLine is an asynchronous operation. In its callback, you can obtain or set the size and position of an asset.

Below is an example:

// Specify the position of an asset on the preview area before adding the asset.
HuaweiVideoEditor.setDisplay(videoContentLayout);

Click here for more details.

// Add a video asset to the video lane.
HVEVideoAsset mHveVideoAsset= hveVideoLane.appendVideoAsset(sourceFile.getAbsolutePath());
mEditor.seekTimeLine(0, new HuaweiVideoEditor.SeekCallback() {
@Override
public void onSeekFinished() {
Log.d(TAG, "onSeekFinished: size：" + mHveVideoAsset.getSize() + ", position: " + mHveVideoAsset.getPosition()); }
});

References​

HMS Core Video Editor Kit home page

Development Guide of HMS Core Video Editor Kit