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
7
votes
4 answers

How does ACCESS_BACKGROUND_LOCATION introduced in Android Q affect Geofence APIs?

In order to use the Geofence API the user has to give the app ACCESS_FINE_LOCATION. This location is considered to be dangerous and can be revoked at any time; once this permission is revoked, the app can not request the geofence updates. How does…
aga
  • 25,984
  • 9
  • 77
  • 115
7
votes
1 answer

Android O Geofence Trigger Delay

I have a navigation app that used geofences(Creating and Monitoring Geofences). Google says (Background Location Limits): The average responsiveness for a geofencing event is every couple of minutes or so. On previous Android versions was no…
phnmnn
  • 10,564
  • 9
  • 39
  • 56
7
votes
1 answer

GeoFence Device when app is in background

I have implemented the geoFence api and everything is working good. But there are some problems, I want more clarification regarding my confusions. Here are some of the confusions and problems: I want my user to get notified when he enters a…
Coas Mckey
  • 665
  • 12
  • 35
7
votes
2 answers

Android: Build Polygonal Shape Geofence

According to the API documentation, only Circular shape Geofences allowed: https://developers.google.com/android/reference/com/google/android/gms/location/Geofence.Builder And it's looks for example:…
7
votes
7 answers

Couldn't connect to Google API client

I can't fetch last known location. I have enabled Geocoding API and Google Places API for Android in google console. I added api key to manifest file:
makaron
  • 77
  • 1
  • 1
  • 8
7
votes
3 answers

Geofence PendingIntent with extras

Here is the problem: Service that add geofences: public class GeofenceService extends Service implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener, LocationClient.OnAddGeofencesResultListener,…
reel
  • 191
  • 7
7
votes
4 answers

Not seeing Geofence Transitions in Google's tutorial on Geofencing

I am trying to test Geofence functionality using Google's example: Creating & Monitoring Geofences. I have uploaded the code here. Problem is that I never get a notification of entry or exit. I have Wifi, 4G and GPS on. I have tried to test in the…
user1406716
  • 9,092
  • 22
  • 91
  • 149
7
votes
1 answer

Android Geofencing - No coming intents?

I have a strange problem. I implemented geofencing using Google Services. (Implementation below) On my devices (Samsung Galaxy S and Moto X) they work perfect. On some other devices (HTC Incredible S, Galaxy Note), I receive no transition intents.…
7
votes
2 answers

Does Android ProximityAlert or Geofence drain more battery when the phone is closer to a monitored location?

If I use an Android ProximityAlert with a given radius (say 100m), and my phone is regularly near (or at) that location, will the battery drain be greater than if I am rarely near that location? Is there a distance within which the battery drain…
Richard Russell
  • 1,035
  • 1
  • 9
  • 19
7
votes
6 answers

Android geofence with mock location provider

I have started developing on Android with last Location services feature : Geofences !! Is there any known problem with mock location provider ? Following example here (https://developer.android.com/training/location/geofencing.html) my intent…
ppatierno
  • 7,948
  • 1
  • 24
  • 37
6
votes
1 answer

Geofencing when app is dead

The new Geofencing API from Google is not triggering any of the events when the app is dead. I tried using PendingIntent.getBroadcast() and PendingIntent.getService() but only being able to get the transition events when the app is opened. I…
6
votes
1 answer

Re-register Geofences only when required

According to the Android geofencing documentation one should re-register the geofences if the following cases occur: The device is rebooted. Solution: The app should store the geofences internally (SharedPreferences) when the geofence is added.…
fernandospr
  • 2,541
  • 1
  • 18
  • 37
6
votes
0 answers

Android - Google Geofence API - Get all the registered geofences

I want to retrieve a list of all the geofences currently active in the system. I have a list view in which there is a slider button to switch on and off each Geofence My problem is if the geofence is not triggered and the duration of expiration has…
6
votes
1 answer

Geofences not triggering (pendingintents and broadcastreceiver)

I've used the Android tutorial with Geofences which, obviously, doesn't work when app is closed. So, after searching around, I've noticed user b-ryce on SO used BroadcastReceiver so geofences get triggered even if app is not active (link for his SO…
gregor
  • 540
  • 1
  • 5
  • 14
6
votes
2 answers

Android Geofencing sample app only works if another app is open using GPS

I am working with the Geofence API Sample application I've got it running and seems to work alright. I did make the modifications to it to use BroadcastReceiver instead of the IntentService. But I will only get the notifications if I have some other…
FoamyGuy
  • 45,328
  • 16
  • 118
  • 151
1 2
3
35 36