Location>code7788 >text

【FAQ】HarmonyOS SDK closed source open capability —Push Kit (11)

Popularity:263 ℃/2025-03-25 15:04:23

1. Problem description:

The chart on the right side of Hongmeng push is not displayed normally.

Solution:

For .jpg format file, the header information must be this "jpg:ffd8".

2. Problem description:

The Android App has applied for the notification message self-classification rights of Android applications on the developer platform. The application process and configuration of Hongmeng App are the same as Android. Is there a way to directly migrate Android configuration to Hongmeng App?

Solution:

Can't. Because it is a new application, all the required permissions must be applied through the process.

3. Problem description:

Push backend parameters uri is Baidu's URL. After clicking, can't you jump directly to the browser interface to open the URL?

Solution:

Uri belongs to the uri corresponding to the ability of the built-in page of the application, while Baidu links are external links and cannot be redirected.

The jumping ability here is just to jump to the inside of the application and open the page, and there is no way to jump to external links directly.

4. Problem description:

When the receipt status code in the push service is 31, what does it mean to have permission protection in the target application?

Document address:/consumer/cn/doc/harmonyos-guides-V5/push-msg-receipt-V5#section19100519195717

Solution:

In the src/main/module.json5 file at the project module level, configuring actions and uris values ​​at the same time will return 31 receipts under the skills tag to be redirected to Ability.

Actions and uris values ​​cannot be configured at the same time under the skills tag. If you need to set the push message jump capability and other jump capabilities (such as NFC jump, browser jump, etc.), you need to create different skill objects in the skills array to map the corresponding capabilities respectively.

Corresponding documents:/consumer/cn/doc/harmonyos-guides-V5/push-send-alert-V5#section1792616175914

5. Problem description:

The content pushed by Hongmeng is intercepted, and the server call result Code:80100016 Msg:Anti-Spam: word is forbidden in [CONTENT]

Solution:

The response code is 80100016, which means that the message content verification fails. Check whether the corresponding field contains sensitive words. For the introduction of each service response code, please refer to the document:/consumer/cn/doc/harmonyos-references-V5/push-scenariozed-api-response-V5#section9211164014816

6. Problem description:

After connecting to push, the application starts occasionally and the error code is reported: 0x0000000000000000000000000008.

Solution:

Please follow the instructions in the link below to troubleshoot /consumer/cn/doc/best-practices-V5/bpta-cppcrash-guidance-V5

7. Problem description:

Currently using await () instead of a device unique identifier similar to Android ID. I found that the app will change every time I reinstall it. Is there any other API that can uniquely identify the device?

Solution:

Regarding the unique id identification of the device, you can use AAID identification or OAID

AAID: /consumer/cn/doc/harmonyos-guides-V5/push-get-aaid-V5

OAID: /consumer/cn/doc/harmonyos-guides-V5/oaid-service-V5

At the same time, we will also provide asset capability, which is a secure storage space. Putting AAID in the asset can achieve the effect of uninstalling AAID without clearing the application. However, this method can only be used for normal business demands, and cannot be used to track users. The asset store kit capability is implemented;

Asset Store Kit implementation reference documentation:

/consumer/cn/doc/harmonyos-guides-V5/asset-store-kit-overview-V5