Error adding geofences in Android (status code 1000)

后端 未结 11 1130
孤城傲影
孤城傲影 2020-12-01 17:52

I am getting an error in the onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) callback with statusCode = 1000.

I have my GP

11条回答
  •  粉色の甜心
    2020-12-01 18:25

    Posting this answer since the settings in Android have changed a lot. I had this error twice when I was running a Nexus 5X emulator running API 28. I managed to solve it both times by doing the following:

    1. Turn off your application you are developing (don't let it be in the background)
    2. Go to Settings -> Security & Location -> Location -> Advanced -> Google Location Accuracy. Turn 'Improve Location Accuracy' off.

    1. Turn on 'Improve Location Accuracy'

    Turn on your application again and adding geofences worked for me after I took these steps.

    EDIT: I ran into this issue again a few months later, sometimes the emulator is stubborn and does not actually turn on location accuracy correctly to allow Google's Geofence API to recognise it is turned on. I had turn 'Improve Location Accuracy' on and off at least 10 times before location accuracy worked.

提交回复
热议问题