Error adding geofences in Android (status code 1000)

后端 未结 11 1122
孤城傲影
孤城傲影 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:26

    In Android 9.0: I read MinistryOfChaps answer and I tried do this for one hour but it has not worked to me. So I turned off my app, turned off 'Improve Location Accuracy', turned off Scanning > wi-fi scanning and bluetooth scannig, and I turned off my User location too. After this, I turn on all these options and my geofence finally is working

    0 讨论(0)
  • 2020-12-01 18:28

    I was getting the statusCode 1000 when i was trying to run this app on the emulator. The thing which fixed this was to go in Settings-> locations and access-> Check the enable wifi and gps option on the emulator and it will fix it

    0 讨论(0)
  • 2020-12-01 18:33

    This error occurs also when location service is not enabled. You need to set it enabled.

    0 讨论(0)
  • 2020-12-01 18:34

    You actually gave the answer in your question: Geofence service is not available now. Typically this is because the user turned off location access in settings > location access.

    I had this same issue, and just going to settings --> location and making sure I select the mode for high accuracy fixed this issue.

    PS Device only mode is not good enough, it needs to be High accuracy mode.

    Hope this helps.

    0 讨论(0)
  • 2020-12-01 18:39

    I did silly mistake:

    Error occurred because Device does not have Permission for GPS (Location service).

    More details on Geofencing API here.

    Screen shots for reference:

    Hope this will make you clear.

    0 讨论(0)
提交回复
热议问题