We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core GuidesPush KitFAQs (Archived)

FAQs

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?

1. Service Enabling Questions

[Q1] What are the conditions for enabling 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.


[Q2] What are the restrictions on enabling HUAWEI Push Kit?    

There are no special restrictions. You can enable HUAWEI Push Kit after creating an app in AppGallery Connect.


[Q3] Is HUAWEI Push Kit free?    

Currently, services provided by HUAWEI Push Kit are free of charge.


[Q4] How can I enable HUAWEI Push Kit?    

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.


[Q5] How can I check whether HUAWEI Push Kit is enabled for an app?    
  1. Sign in to AppGallery Connect, select the app to be checked, click Manage APIs, and check whether HUAWEI Push Kit is enabled.

  2. Check whether service status of HUAWEI Push Kit is Enable for the app.            


[Q6] What can I do if HUAWEI Push Kit fails to be enabled?    
  1. Check whether HUAWEI Push Kit has been enabled.                

    If HUAWEI Push Kit has already been enabled, repeated enabling is not allowed.                

  2.  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.            

  3. 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.            


[Q7] Does app transfer and claim affect HUAWEI Push Kit rights?    

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.


[Q8] What are the requirements for a phone to receive messages sent by the HUAWEI Push Kit server?    
  1. 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.            

  2. Network: Phones are connected to the network and the connection is stable.            

  3. 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.


[Q9] How many messages can HUAWEI Push Kit send at a time?    
HUAWEI Push Kit server allows a maximum of 1,000 messages to be sent at a time. If more messages need to be sent, your app server will have to send them in stead.

[Q10] What restrictions are there on HUAWEI Push Kit? What measure is taken to prevent developers from disturbing users?
The maximum number of messages that can be sent to an app on a device is 3,000 a day. Exceeding this number, messaging traffic to the app will be limited. When the number of messages exceeds 100,000, the account that is used to send the messages will be suspended.
[Q11] What are the restrictions on using HUAWEI Push Kit?    

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.


2. Service Access Questions

[Q1] What are differences between data messages and notification messages?    
  • 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.


[Q2] How to send messages to users outside China through HUAWEI Push Kit?    

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.


[Q3] Why does a device fail to receive messages from the server?    

Possible causes:        

  1. 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.

  2. Device and network: Check that the network connection of the device is stable and the notification function is enabled on the device.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.


[Q4] How can I capture logs on a device?    
  1. 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            

  2. Reproduce the fault.            

  3. 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.


[Q5] What are the main tags supported by HUAWEI Push Kit?    

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.


[Q6] How can I send a test message using HUAWEI Push Kit?    

[Q7] What can I do if the onNewToken method cannot be called back when the EMUI version is earlier than 10.0?
If the EMUI version on a Huawei device is earlier than 10.0 and no token is returned using the getToken method, a token will be returned using the onNewToken method. If the onNewToken method cannot be called back, check whether HUAWEI Push Kit is enabled.

[Q8] How is the version on the HUAWEI Push Kit server compatible with that on user devices?
The version on a user device refers to the version of the HMS Core Push SDK and HMS Core on the device. The latest version is V4. The version on the HUAWEI Push Kit server refers to the version of the RESTful API provided by the server. The current version is V3 and is compatible with V2. The V3 RESTful API of the HUAWEI Push Kit server provides some new functions. If a user device needs to use these functions, the HMS Core Push SDK and HMS Core on the device must be upgraded to the required version.

3. Client Result Code Questions 

[Q1] What does result code 907135000 mean?    

Description        

It means incorrect input parameters.

Troubleshooting        

  1. Check that the app_id and package_name parameters in the agconnect-services.json file are correct.

  2. Check that the certificate signature is configured in the build.gradle file.

  3. 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.

  4. 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.


[Q2] What does result code 907135700 mean?    

Description        

Failed to call the gateway to query the app scope.

Troubleshooting        

  1. 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.

  2. 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.

  3. Sign in to AppGallery Connect and check that HUAWEI Push Kit is enabled.

  4. Check that the network connection is normal. You are advised to use a 4G data network for the test.


[Q3] What does result code 6003 mean?    

Description        

It means inconsistent certificate fingerprint configurations.

Troubleshooting        

  1. 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.

  2. 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.


4. Server Result Code Questions

[Q1] What does result code 80100016 mean?    
It means that a sensitive word.

[Q2] What does result code 80300002 mean?    

Description        

It means that there is no permission to send a message to a specified device (token).

Troubleshooting        

  1. Sign in to AppGallery Connect and check that HUAWEI Push Kit is enabled.

  2. 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. 

  3. The token does not match the app.

  4. Check whether the value of msg type is 1 or 3. Currently, the value 2 is not supported.

  5. 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.

  6. Check whether input errors exist in the body of the message sent.

  7. Send a test message on HUAWEI Push Kit Console. If the message is received, the fault is caused by API calling.


[Q3] What does result code 80300007 mean?    

Description        

The specified token is invalid.

Troubleshooting        

  1. Different apps on the same device need to use different tokens. However, the same token may be delivered.

  2. The APK name and app ID configured for the app on the device are different from those applied from AppGallery Connect.

  3. Check whether the URL for obtaining the authentication token is https://login.cloud.huawei.com/oauth2/v2/token.

  4. 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.


5. Message Display Questions

[Q1] Does HUAWEI Push Kit depend on signing in with a HUAWEI ID?    

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.


6. Other Questions

[Q1] How can I view reports of HUAWEI Push Kit?    

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.


[Q2] How can I apply for special permissions?    

The following table lists special permission that you can apply for.

Expand

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.

  1. This permission is available to intra-enterprise apps, such as the app for intra-enterprise communication or for the management system.

  2. The number of enterprise users is greater than or equal to 500.

High-priority data messages[Beta]

When a data message arrives at the   destination device, the corresponding app is directly started.

  1. This permission is available only to apps that support the VoIP phone function.

  2. This permission is available to apps for intra-enterprise communication or alert apps.

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.
  1. This permission is available to intra-enterprise apps, such as the app for intra-enterprise communication or for the management system.

  2. The number of enterprise users is greater than or equal to 500.


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.


7. Technical Support Questions

  1. Search for your question on this page and preliminarily locate the fault.

  2. If the fault persists, submit your logs at Submit ticket online.

This page may contain third-party content. For details, click here.