I can't create Huawei Push token.
TokenTask failed, ErrorCode: 907122012
- when push_kit_auto_init_enabled=true
in manifest
String: com.huawei.hms.common.ApiException: 907122037: get token error
- when i trying to get token manually in
String huaweiappid = HmsInstanceId.getInstance(context).getId();
String huaweitoken = HmsInstanceId.getInstance(context).getToken(huaweiappid, "HCM");
//this is stacktrace
com.huawei.hms.aaid.constant.ErrorEnum.toApiException(ErrorEnum.java:1)
com.huawei.hms.opendevice.l.a(GetTokenTask.java:5)
com.huawei.hms.opendevice.l.doExecute(GetTokenTask.java:1)
com.huawei.hms.common.internal.TaskApiCall.onResponse(TaskApiCall.java:5)
com.huawei.hms.common.internal.HuaweiApiManager$ConnectionManager$1.onCallback(HuaweiApiManager.java:18)
com.huawei.hms.common.internal.HmsClient$BaseAdapterCallBack.doCallback(HmsClient.java:5)
com.huawei.hms.common.internal.HmsClient$BaseAdapterCallBack.onComplete(HmsClient.java:1)
com.huawei.hms.adapter.BaseAdapter$BaseRequestResultCallback.handleSolutionIntent(BaseAdapter.java:16)
com.huawei.hms.adapter.BaseAdapter$BaseRequestResultCallback.onResult(BaseAdapter.java:104)
com.huawei.hms.adapter.BaseAdapter$BaseRequestResultCallback.onResult(BaseAdapter.java:1)
com.huawei.hms.support.api.PendingResultImpl$d.b(PendingResultImpl.java:1)
com.huawei.hms.support.api.PendingResultImpl$d.handleMessage(PendingResultImpl.java:4)
android.os.Handler.dispatchMessage(Handler.java:107)
android.os.Looper.loop(Looper.java:225)
android.app.ActivityThread.main(ActivityThread.java:7563)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
How can i get my Huawei client's token?
My problem is solved! I change my build.gradle (app:)
for signing debug version with release keystore, clear app data and cache in HMS Core app. Manual: https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-integrating-sdk-0000001050040084