Google Awareness API SecurityException is thrown

后端 未结 4 560
醉酒成梦
醉酒成梦 2021-02-04 17:50

I\'m using DetectedActivityFence from Google Awareness API. It\'s working fine on my own devices, but I received a several crashes in Crashlytics about SecurityException

4条回答
  •  日久生厌
    2021-02-04 18:37

    There is a bug that erroneously mistakes some errors from the network operation to authenticate the app as indicating that the API key was not set up correctly, even though the actual error was something else. This has been fixed internally and will roll out in the next Google Play services release.

    For now, the best workaround is to add an UncaughtExceptionHandler on the thread that calls GoogleApiClient.connect(). If you call GoogleApiClient.connect() on the main thread, then you can get the Thread instance via Looper.myLooper().getThread().

提交回复
热议问题