Questions tagged [android-geofence]

Represents a geographical region, also known as a geofence.

Geofences can be monitored by geofencer service. And when the user crosses the boundary of a geofence, an alert will be generated.

As currently implemented, in the Google Play Services API, geofences are circular, defined using coordinates (lat, long) and radius.

Documentation

529 questions
45
votes
1 answer

Android play services 6.5: LocationClient is missing

After updating to Google Play Services 6.5.87 my app was failed to compile because of missing LocationCLient class. The documentation link is corrupted at the moment (404 Not Found) How can I fix it? I want to receive location updates, work with…
34
votes
3 answers

Change Location Mode to High Accuracy Programmatically Android

Is it possible to get the information on the location mode which the user has selected among the three modes under the location settings options i.e 1.Hight Accuracy 2.Battery Saving 3.GPS Only I want to programmatically check if user has selected…
ik024
  • 3,328
  • 5
  • 31
  • 58
34
votes
3 answers

Android Geofence eventually stop getting transition intents

I have an app that started with the Google's geofencing sample code. It works great for a few days, and I get all the transition intents as I anticipate. However, after a bit of time, something like 3 days, the app stops getting these intents, and I…
b-ryce
  • 5,440
  • 7
  • 42
  • 66
34
votes
12 answers

Error adding geofences in Android (status code 1000)

I am getting an error in the onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) callback with statusCode = 1000. I have my GPS enabled and my WiFi. I also have Google Play Services and I am able to track my location and request…
24
votes
2 answers

Android 11 users can’t grant background location permission?

As of Android 11, apps targeting SDK 30+ will not show a user an option to grant background location permission to an app more than once. If not initially granted, it requires users to go to a settings page. How do we bring a user to the proper…
davidgyoung
  • 59,109
  • 12
  • 105
  • 181
24
votes
1 answer

How to increase consistency of Android geofence enter/exit notifications?

I am using the built in geofence APIs (play services) and have been having mixed results. It looks like after setting a geofence, the notifications for entering/exiting are very inconsistent even when GPS is on, with an up-to-date location…
oviroa
  • 1,070
  • 2
  • 11
  • 29
23
votes
2 answers

Do Geofences remain active in android after a device reboot

I'm writing an application that needs to use geofencing for when someone enters/exits multiple sites over the lifetime of the application being installed. My implementation of geofencing (very similar to the second link below) is all working fine…
21
votes
2 answers

Unable to add Geofence in Android because "network location is disabled"

I'm attempting to add a geofence to an Android application. I noticed the following in the logs: 07-04 11:41:19.201 1945-2271/com.google.android.gms.persistent W/GeofencerStateMachine: Ignoring addGeofence because network location is disabled. I…
zundi
  • 2,063
  • 1
  • 23
  • 40
21
votes
5 answers

How do I use the Android Geofencing API?

I have been testing the new Google Play Geofencing service API. I downloaded the sample code from the Android developers site. Next, I ran the example code on an Android device (Galaxy Note 2). I placed my office geo-position and radius to 10m, but…
kylee
  • 219
  • 1
  • 2
  • 3
17
votes
1 answer

Is geofencing completely unusable in Android?

Because of this bug my team is deciding to not use geofencing at all. Is geofencing in Android something that is usable or not? From the bug report: On all in-house test devices everything runs fine with debug and release builds. However, for…
Bruno Bronosky
  • 54,357
  • 9
  • 132
  • 120
17
votes
3 answers

Handling multiple geofences transition with common area

If I have these two geofences, after registering these geofences I should get notified when I'm entering or exiting the circumference of these circles. However, I don't want my App to send a notification if I'm moving through the common area, i.e.…
Pankaj
  • 2,005
  • 2
  • 17
  • 36
15
votes
4 answers

How to implement "un-dwell" in android geofences?

I have a problem understanding Androids geofences. Actual Problem: I used Enter+Exit events from googles geofence-api, but on many devices the signal is so inaccurate that it jumps in and out a fence (jumps are greater than radius 400m…
Jens
  • 479
  • 3
  • 21
15
votes
3 answers

Are Android geofences surviving a reboot?

is the system persisting them or do I have to add them again them after reboot? I have not found anything about that in the documentation at https://developer.android.com/training/location/geofencing.html
ligi
  • 35,518
  • 37
  • 123
  • 220
15
votes
6 answers

Bug in Android Geofence Sample code? Can anyone please confirm?

I am not sure if this is a bug with the new Android GeoFence sample code or my understanding of what it is supposed to do is wrong. The sample app creates geofences but does not alert when geofence is breached. If anyone would like to give this a…
Torri Veganas
  • 281
  • 1
  • 3
  • 12
14
votes
1 answer

Android LocationServices.GeofencingApi example usage

Does anyone know of an example of using the LocationServices.GeofencingApi? All the android geofencing examples I find are using the deprecated LocationClient class. From what I can see, the LocationServices class is the one to use, but there…
InquisitorJax
  • 984
  • 9
  • 15
1
2 3
35 36