Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.
Initial release was on November 26, 2019.
This section classifies questions into service enabling, service access, message display, and other questions and answers the questions in sequence. You can browse or press Ctrl+F to search for a question.
Top questions:
What are the restrictions on using HUAWEI Push Kit?
Why does a device fail to receive messages from the server?
How can I view reports of HUAWEI Push Kit?
To enable HUAWEI Push Kit, you only need to upload the APK of your app to HUAWEI AppGallery and save it as a draft.
There are no special restrictions. You can enable HUAWEI Push Kit after creating an app in AppGallery Connect.
Currently, services provided by HUAWEI Push Kit are free of charge.
To enable HUAWEI Push Kit, you need to perform the following steps:
Enable HUAWEI Push Kit.
For details, please refer to Enabling Services.
Set HUAWEI Push Kit parameters.
For details, please refer to Configuring Push Service Parameters.
Sign in to AppGallery Connect, select the app to be checked, click Manage APIs, and check whether HUAWEI Push Kit is enabled.
Check whether service status of HUAWEI Push Kit is Enable for the app.
Check whether HUAWEI Push Kit has been enabled.
If HUAWEI Push Kit has already been enabled, repeated enabling is not allowed.
Check whether duplicate APK names exist.
Check whether your APK has been uploaded to HUAWEI AppGallery before. If so, select the APK name from the Search for apps drop-down list box instead of clicking New.
Check whether the APK has been uploaded in another account. If so, delete or transfer the APK from the account. For details about how to transfer the APK, please refer to the App Transfer Operation Guide.
If the fault persists, submit a trouble ticket containing the latest APK name, app ID, enterprise name, and enterprise account at Submit ticket online. Huawei will handle the trouble ticket in one to two days.
After app claim, HUAWEI Push Kit becomes invalid and the app ID changes. You need to apply for HUAWEI Push Kit again using the new app ID.
App transfer does not affect HUAWEI Push Kit rights.
Device: Huawei phones can receive messages. On non-Huawei phones, HMS Core (APK) must be installed for receiving messages. The app can be downloaded from HUAWEI AppGallery.
Network: Phones are connected to the network and the connection is stable.
EMUI version: Some Huawei phones running EMUI 4.0 or EMUI 4.1 and all Huawei phones running EMUI 5.0 or a later version can receive messages. EMUI 5.0 and later versions are recommended.
Due to Android API restrictions, Huawei phones running earlier EMUI systems and non-Huawei phones, which are sold outside China can use HUAWEI Push Kit only when Android API level 21 (Android 5.0) or later is used.
Restriction on the number of messages to be sent: A maximum of 3,000 messages can be sent to an app on a device every day. If the number exceeds 3,000, messaging traffic to the app will be limited for 24 hours. If the number of messages exceeds 100,000, HUAWEI Push Kit will be directly disabled. In this case, rectification must be performed and a rectification plan must be submitted to apply for HUAWEI Push Kit again.
Restriction on the messaging rate: HUAWEI Push Kit allocates the messaging rate to an app based on its number of monthly active users (MAU) on Huawei devices and the app category selected during app release on HUAWEI AppGallery.
App QPS = MAU of the app on Huawei devices x App category weight x Overall allocation coefficient (0.00072)
Quantity per second (QPS) indicates the number of messages that can be sent per second.
Sign in to Huawei Developer Console and go to HUAWEI AppGallery>Analytics>App page>Operation Analysis>Push Kit>Reports>By user>Monthly active users to obtain the MAU of the app on Huawei devices.
App category: level-2 category of an app selected when the app is released on HUAWEI AppGallery. You can obtain it by going to HUAWEI Developer>HUAWEI AppGallery>My apps>App name>App information>Categorization>Level-2 category
The following table describes app category weight.
Group | App Type | Weight Coefficient |
IM | Communication | 5 |
Finance | Finance | 5 |
News | Books and references/Information | 4 |
Content | Book reading/Media and entertainment/Photography | 3 |
E-commerce | Shopping | 3 |
Basic necessities of life | Lifestyle and convenience/Navigation/Food and drink/Travel and accommodation | 3 |
Business | Business | 3 |
Gaming | Network games/Puzzles games/Simulation games/Board games | 2 |
Tools | Utilities | 1 |
Sports and health | Healthcare/Fitness and health | 1 |
Others | Kids/Education/Personalized themes/Cars | 1 |
Default | Default (not released) | 1 |
If QPS calculated for your app is less than 6000, the default value 6000 QPS will be used. When traffic on the network is heavy, system-level traffic control will be performed.(The corresponding HTTP status code is 503.)
Notice: QPS calculation rules apply only to the Chinese mainland.
Data messages are not displayed after being sent by HUAWEI Push Kit to phones. Instead, the messages are transferred to the developer's app, and the app is responsible for parsing and displaying messages.
After a device receives a notification message, the system directly displays it in NC. The user can tap the notification message to trigger the corresponding action such as opening the app, a web page, or a specific page in the app.
HUAWEI Push Kit supports cross-region messaging, but the messaging performance deteriorates in this scenario. To reduce cross-region messaging, it is recommended that developers deploy servers in the regions where users gather.
Possible causes:
Message type: Check the type of a message sent. If the message is a data message, the message may fail to arrive at the device after the app process is terminated.
Device and network: Check that the network connection of the device is stable and the notification function is enabled on the device.
EMUI version: Check the EMUI version. If the EMUI version is earlier than 4.1 or the version of HMS Core (APK) is earlier than requested, messages sent cannot be displayed.
If the EMUI version is an earlier 8.0 version such as 8.0.0, you need to use a platform with targetSdkVersion earlier than 26 for app compilation and building or upgrade the EMUI system on the Settings > System & updates > Software update page. The upgrade path may vary according to the device model.
Traffic control: Check whether the traffic is limited. A maximum of 3000 messages can be sent to a single device every day. If the number exceeds 3000, the traffic will be limited for 24 hours. If the number exceeds 100,000, HUAWEI Push Kit will be disabled.
Cache: Check for the cache problem with HMS Core (APK). Clear the data and cache for the app and HMS Core (APK), restart the device, and test again.
Token: Check that the token on the device is correct. Send a message to the device on the console of AppGallery Connect. If the message fails to be sent, the token has expired or the device configuration is incorrect. Check the token and configure device permissions. If the message is successfully sent, the API parameters are set incorrectly.
Message body format: Check the format of the message body encapsulated on the server. You are advised to check the message body fields by referring to Server APIs.
If the fault persists, collect logs and send the log files and fault description to Submit ticket online.
Connect the ADB tool to your device and run the following commands:
adb shell setprop log.tag.hwpush VERBOSE
adb logcat -v threadtime 1> D:\hwpush.log
Reproduce the fault.
Press Ctrl+C to complete log capture.
In addition, record the device model, EMUI version, HMS Core (APK) version, integrated SDK version, and fault reproduction procedure so that technical personnel can help you quickly locate the fault.
In HUAWEI Push Kit 3.0, the supported tags mainly include the device model, first access time, region, system language, and app version number. You can group users by tag.
For details, please refer to Sending Messages from the HUAWEI Push Kit Console.
Description
It means incorrect input parameters.
Troubleshooting
Check that the app_id and package_name parameters in the agconnect-services.json file are correct.
Check that the certificate signature is configured in the build.gradle file.
The fault may be caused by the cache of HMS Core (APK). Uninstall and then reinstall HMS Core (APK), disconnect and reconnect the phone with the Internet, and start the app again.
It is recommended that you use a Huawei device to perform the test first. HUAWEI Push Kit depends on HMS Core (APK), which is pre-installed on all Huawei devices but not on non-Huawei devices.
Description
Failed to call the gateway to query the app scope.
Troubleshooting
If HMS Core Push SDK 2.5.2.0 is integrated with your app, remove appid= from the configuration. If the version is not 2.5.2.0, ignore this step.
Find HMS Core (APK) on the Apps page of your device and uninstall it. (If you cannot find it on this page, tap Show system processes to search for it.) If the HMS Core Push SDK is correctly integrated with your app, when you start the app, it will instruct you to download HMS Core (APK). Download and install it following the instruction and perform the test again. If the HMS Core Push SDK is not correctly integrated with your app, download HMS Core (APK) from HUAWEI AppGallery, install it, and perform the test again.
Sign in to AppGallery Connect and check that HUAWEI Push Kit is enabled.
Check that the network connection is normal. You are advised to use a 4G data network for the test.
Description
It means inconsistent certificate fingerprint configurations.
Troubleshooting
Ensure that the certificate fingerprint packed in the app on your device is consistent with that configured through SHA-256 certificate fingerprint in AppGallery Connect. For details, please refer to Preparations.
HMS Core (APK) will cache the signature file. You need to find HMS Core (APK) on the Apps page of your device and clear its data and cache, restart your app, and perform the previous operation again.
Description
It means that there is no permission to send a message to a specified device (token).
Troubleshooting
Sign in to AppGallery Connect and check that HUAWEI Push Kit is enabled.
If HMS Core Push SDK 2.0 is integrated, remove the backslash (\) from the escape character in the access token (AT) and then encode the token using UrlEncode.
The token does not match the app.
Check whether the value of msg type is 1 or 3. Currently, the value 2 is not supported.
If HUAWEI Push Kit functions normally in China and result code 80300002 is returned only for devices outside China, you need to enable HUAWEI Push Kit for devices outside China. Find your app, disable HUAWEI Push Kit, and then enable it again. Note that if you wish to enable HUAWEI Push Kit only, upload the APK of your app to HUAWEI AppGallery first (you can save the APK as a draft). Otherwise, you cannot find the app when enabling HUAWEI Push Kit again.
Check whether input errors exist in the body of the message sent.
Send a test message on HUAWEI Push Kit Console. If the message is received, the fault is caused by API calling.
Description
The specified token is invalid.
Troubleshooting
Different apps on the same device need to use different tokens. However, the same token may be delivered.
The APK name and app ID configured for the app on the device are different from those applied from AppGallery Connect.
Check whether the URL for obtaining the authentication token is https://login.cloud.huawei.com/oauth2/v2/token.
Check whether the message sending URL is https://api.push.hicloud.com/pushsend.do when the HMS Core Push SDK 2.0 is integrated or whether it is https://push-api.cloud.huawei.com/v1/[appId]/messages:send when the HMS Core Push SDK 3.0 or later is integrated.
HUAWEI Push Kit does not depend on signing in with a HUAWEI ID. You can receive messages from HUAWEI Push Kit without such signing in.
a. You can go to Huawei Developer Console > HUAWEI AppGallery > Analytics > App page > operation analysis and view statistical reports.
b. Report rules: Currently, reports are not updated in real time, and one-day delay exists in statistics.
c. Report items are described as follows:
Sent times: number of devices to which messages are sent.
App uninstalled: An app is uninstalled and not reinstalled.
Invalid token: A message is not displayed due to an invalid token (for example, the app is reinstalled but not activated) despite that it has been delivered to the device.
Rejected by users: The user disables the notification function of the app.
Discarded for silent devices: Devices that have been offline for over 30 days are defined as silent devices and cannot receive messages.
Discarded due to frequency control: A maximum of 3000 messages can be sent to a single device per day. Excessive messages will be discarded.
Cached: The destination device is offline but the message is still valid.
Expired: The destination device keeps offline in the validity period of the message and the message has expired.
Delivered times: number of messages received.
Tapped times: number of messages sent.
Delivery rate (%): Delivered times/Sent times.
Tap-through rate (%): Tapped times/Delivered times.
The following table lists special permission that you can apply for.
Permission | Function | Application Condition |
Sticky notification messages[Beta] | After a user taps a notification message in NC, the message remains in NC and will be deleted only when the user actively deletes it. |
|
High-priority data messages[Beta] | When a data message arrives at the destination device, the corresponding app is directly started. |
|
Voice playing[Beta] | After a message arrives at the destination device, the app is started to play the voice. | This permission is available to apps that support voice playing. |
| High-priority notification message[Beta] | Notification messages are displayed in banner style. |
|
Application guide:
Send an application email containing the following information to hwpush@huawei.com. Huawei will send you the application result within 15 working days. Please check your emails in time.
Subject: [Applying for an additional permission] - App name.
Body: permission name, app name, package name, app ID, application scenario, and app screenshot for the notification message that requires the permission, for example, the VoIP call page.
Sample application email:
Subject: [Applying for an additional permission] - WeLink
Body:
Permission name: Sticky messages
App name: WeLink
APK name: welink.huawei.com
App ID: 1282412
Application scenario: WeLink is an intra-enterprise communication app. It is often used to send notification messages such as conference and calendar reminders. Therefore, we want to apply for the sticky messages permission for the app so that notification messages will remain displayed after being tapping and users can view the messages anytime as required.
Message display screenshot in the following scenarios:
To apply for the sticky notification message, you need to provide a display screenshot of the notification message.
To apply for a high-priority notification message, you need to provide the banner message screenshots in various push scenarios, such as IM and review message screenshots.
To apply for the high-priority data message, you need to provide the VoIP call screenshot.
To apply for voice playing, you need to provide the voice message display screenshot.
Search for your question on this page and preliminarily locate the fault.
If the fault persists, submit your logs at Submit ticket online.