Google Awareness API SecurityException is thrown

后端 未结 4 559
醉酒成梦
醉酒成梦 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:32

    From: https://code.google.com/p/android/issues/detail?id=223751#c2

    There is a bug in our checks that is sometimes throwing this SecurityException when there is a network error to authenticate. The fix will rollout in the next version of Google Play services.

    For now, the best workaround would be set up an UncaughtExceptionHandler on the thread that you call GoogleApiClient.connect(). For most folks, this would be on the main thread, which you can get via Looper.myLooper().getThread().

    But you will also notice that replies indicate that is not a solid work around.

    You may also notice that the OP of that thread references this SO post, but the accepted answer doesn't back reference the thread, even though they copied from it verbatim. Very bad form!

提交回复
热议问题