2

When I try to get use getToken method, it return the 907122050 error code, what is that mean?

    try {
      token = HmsInstanceId.getInstance(context).getToken(appId, defaultScope);
    } catch (ApiException e) {
      CoreLogger.e("getToken error: " + e.getStatusCode());
    }
zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
ccd
  • 5,788
  • 10
  • 46
  • 96

1 Answers1

0

According to Docs.

HMS Core Push SDK Result Codes

Result Codes 907122050 indicates the operation cannot be performed in the main thread. The method needs to be created in the subthread.

Solution: Need to Create a thread and call a specific method in the new thread.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108