If your application is connected to a vendor channel, but a log similar to the following one is found in the application operation logs:
[OtherPushClient] handleUpdateToken other push token is : other push type: huawei
Then it means that your application failed to register with the vendor channel. You can locate and troubleshoot the problem by getting the return code for vendor channel registration failure.
Tencent Push Notification Service SDK for Android provides the following ways to get the return code for vendor channel registration:
Filter application operation logs by the keyword OtherPush
to find logs similar to the following ones and locate the return code for vendor channel registration:
// Huawei channel
// If filtering by the keyword `OtherPush` cannot find the return code, you can try the keyword `HMSSDK` and find the return code after `onResult` or `onConnect`
[OtherPushHuaWeiImpl] other push huawei onConnect code:907135702
n// Mi channel
[OtherPush_XG_MI] register failed, errorCode: 22022, reason: Invalid package name: com.xxx.xxx
// Meizu channel
[OtherPush_XG_MZ] onRegisterStatus BasicPushStatus{code='110000', message='Invalid appId'}
// OPPO channel
[OtherPushOppoImpl] OppoPush Register failed, code=14, msg=INVALID_APP_KEY
// vivo channel
[OtherPushVivoImpl] vivoPush Register or UnRegister fail, code = 10003
You can refer to the official push documentation of each vendor to get the specific descriptions of return codes and troubleshoot accordingly. The table below lists some common error codes:
Vendor Channel | Return Code | Description | Suggested Solution | Link |
---|---|---|---|---|
Huawei | 1001 | Make sure that the "HMS" or "HMS-Core" application is installed in the phone, which is required for Huawei Push | Go to Huawei AppGallery to download and install the "HMS-Core" application | Huawei return codes |
6003 | The application APK is not signed or contains signing information that doesn't match that registered on the Huawei Developer platform; however, it must be correctly signed for Huawei Push | Sign the APK file or check whether the signing information is correctConfiguring the signature certificate fingerprint for the Huawei channel | ||
907135000 | The `appId` is invalid | |||
907135702 | The SHA256 value of the signature file is different from that configured on the Huawei Push platform | Check whether the entered SHA256 value of the signature file is the same as the one configured on the Huawei Push platform (multiple ones can be added) | ||
907135003 | The `apiclient` object is invalid | |
||
HONOR | 8001000 | The device does not support HONOR push | HONOR return codes | |
8001003 | Failed to obtain the application certificate fingerprint | Configure your certificate fingerprint | ||
Mi | 22006 | The application ID is invalid | Check whether the application package name, `appId`, and `appKey` match each other on the Mi Push platform | Mi return codes |
22007 | The application key is invalid | Check whether the application package name, `appId`, and `appKey` match each other on the Mi Push platform | ||
22022 | The application package name is invalid | Check whether the application package name, `appId`, and `appKey` match each other on the Mi Push platform | ||
Meizu | 110000 | The `appId` is invalid | Check whether the application package name, `appId`, and `appKey` match each other on the Meizu Push platform. Check the application information on the Flyme Push platform | Meizu return codes |
110001 | The `appKey` is invalid | Check whether the application package name, `appId`, and `appKey` match each other on the Meizu Push platform | ||
OPPO | 14 | The `AppKey` parameter is invalid | Please note that OPPO's `AppKey` instead of `AppId` should be entered for `setOppoPushAppId`, while OPPO's `AppSecret` instead of `AppKey` should be entered for `setOppoPushAppKey` | OPPO return codes |
15 | The `AppKey` parameter is missing | Enter the `AppKey` parameter | ||
vivo | 10003 | The application package name does not match the configured one | Check whether the application package name, `appId`, and `appKey` match each other on the vivo Push platform | vivo return codes |
10004 | The `appKey` is incorrect | Check whether the application package name, `appId`, and `appKey` match each other on the vivo Push platform | ||
10005 | The `appId` is incorrect | Check whether the application package name, `appId`, and `appKey` match each other on the vivo Push platform | ||
For Huawei Push, the push service needs to be enabled on the Huawei Push platform
If you cannot get the Huawei token on your Huawei device, and the return code for vendor push channel registration is 0, then please go to the Huawei Push platform, check whether the push service is enabled for the application on the Development -> Push Service page and whether Push Kit
and App Messaging
are enabled on the Development -> Project Settings -> API Management page.
For Mi Push, the push service needs to be enabled on the Mi Push platform
If you cannot find the return code for Mi channel registration, please check whether the application's message push service is enabled on Mi Open Platform -> Push Platform.
For OPPO Push, the push feature needs to be enabled first before messages can be pushed
On the push service page on OPPO Open Platform, you can view applications with the service enabled and those not enabled. Among those not enabled, click the one for which you want to apply for push permission to enter the push service page and apply for enablement accordingly.
For vivo Push, the push feature needs to be enabled first before messages can be pushed
Go to vivo Open Platform -> Push Platform -> Message Push -> All Applications, click **Application Name to select the target application among all the created applications, and click Submit Application.
Note:For some vendors, the push service will take effect around 5 minutes after it is enabled. If registration still fails after the push service is enabled, please wait a while and try again.
The HMS version is too low
Search for the keyword "HMSSDK" in the logs, and if a log similar to the following one is found, that is, connect versionCode
is lower than connect minVersion
, then it means that the system application "HMS" or "HMS_Core" is too old. Please retry registering after upgrading the application.
I/HMSSDK_HuaweiApiClientImpl: ====== HMSSDK version: 20601301 ======
I/HMSSDK_HuaweiApiClientImpl: Enter connect, Connection Status: 1
E/HMSSDK_Util: In getHmsVersion, Failed to read meta data for the HMS VERSION.
I/HMSSDK_HuaweiApiClientImpl: connect minVersion:20600000
I/HMSSDK_HuaweiMobileServicesUtil: connect versionCode:20301306
D/HMSAgent: connect end:-1001
Some vivo models do not support the push service
vivo Push is supported only on certain newer models and corresponding OS versions. For more information, please see here.
Was this page helpful?