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
13
votes
1 answer

How to add background service in Geofence android

I am trying to create a geofence with background service for monitor. The geofence create successfully and work when apps Activity is open but when close the app geofence not work. What should I do now. My code is: public class MapsActivity extends…
12
votes
2 answers

Android wear: geofence - ApiException: 1000

I am building an Android app for Android Wear. For battery savings I am trying to use Geofences to track if you enter or exit a location. But I cannot get it working. First of all I am not sure if Geofences are supported on Android Wear?…
kevingoos
  • 2,771
  • 3
  • 30
  • 53
12
votes
1 answer

Geofences not working when app is killed

I know similar questions have been asked before but answers were not perfect. I created an app with geofences using the sample code from android developer website. I did not use any shared preferences to store geofences as I am not removing the…
Neanderthal
  • 857
  • 1
  • 7
  • 25
11
votes
7 answers

Adding Geofence gives ApiException status 13

Recently run into a problem where adding geofences will randomly fail with an ApiException, status code 13 which is defined as "ERROR" no extra details provided. Normally the error codes are specific to geofencing, but this seems to be a generic…
11
votes
1 answer

Geofence with BroadcastReceiver is not always triggered

Before when I was using geofence in my application I was using IntentService as its callback and everything was ok. But now because of changes in Android 8 I wasn't able to start service like that anymore. So instead now I am using BroadcastReceiver…
matip
  • 704
  • 1
  • 7
  • 22
11
votes
1 answer

Intent not received from Android Geofence event

Everything builds correctly and runs in the emulator, but I cannot seem to get my IntentService to log anything. I'm sure there's something basic that I'm missing or overlooking, but I'm pretty new to Android/Java and have run out of ideas at this…
11
votes
2 answers

Android Geofencing BroadcastReceiver not Triggered

I am currently making a Geofencing app for android, and I followed their tutorial but I cant seem to get the BroadcastReceiver to trigger correctly. The onAddGeofencesResult is called, but the BroadcastReceiver is not ever called. And idea why? I…
Josh
  • 1,442
  • 2
  • 18
  • 34
9
votes
2 answers

How to monitor geofences in background on Oreo?

I followed this tutorial: https://developer.android.com/training/location/geofencing and works fine on Android < 8, but in Oreo i have problems due to new OS background limitations. How can I get geofence transition triggers when app is in…
9
votes
2 answers

Monitoring Location Settings in a Library

I'm working on a library that can be used to monitor geofences on Android devices. I've noticed that the geofences I register with Google Play Location Services GeofencingApi class are lost after I turn Location Services off and back on in the…
Rob Szumlakowski
  • 947
  • 3
  • 8
  • 18
9
votes
5 answers

How to make Geo Fencing alert more accurate in Android

Hello I am trying to add feature of Geo Fence in Android. I am using the http://developer.android.com/training/location/geofencing.html for creating and monitoring Geo Fences. I am using the IntentService for the alert (Entered/Exited) but for me it…
N Sharma
  • 28,073
  • 81
  • 228
  • 405
9
votes
3 answers

Android Geofencing

I've gone through the tutorial for Geofencing and I have question in mind. Does geofencing require you to continuously monitor the user's location ? Or will the LocationClient to which you add the Geofence automatically trigger when a transition…
Traxex1909
  • 2,450
  • 4
  • 17
  • 23
9
votes
5 answers

Geofencing API triggers enter event when already in zone

I've encountered this problem with the latest Android Geofence API. The usage is exact to the example usage. I set Geofence.GEOFENCE_TRANSITION_ENTER type geofence with 500m radius and expiration is Geofence.NEVER_EXPIRE. This works ok, but if I'm…
Niko
  • 7,663
  • 5
  • 43
  • 78
8
votes
2 answers

Geofence Notification not triggered when app in background

I have already gone through many SO posts , but nothing has worked yet for me. I am trying to trigger notification when device enters a geofence . But it does not trigger until app is opened. How would it be possible to trigger notification when app…
devcodes
  • 825
  • 14
  • 33
8
votes
1 answer

Do I need to request location updates when using Fused location Geofences?

I have successfully implemented location geofencing using the Android Developers documentation. The problem I am having is that the geofence events are not always reliable. Sometimes they trigger as soon as I'm at the location, sometimes they take a…
Nick
  • 718
  • 1
  • 5
  • 23
8
votes
4 answers

Do Android Geofences remain active until removed/expired or only until my PendingIntent is launched

I'm about to implement a feature with geofences and before I get any serious work done, I need to know whether geofences remain active after the first transition. The core of the feature is: every time I'm within x meters of point P (call this…
1
2
3
35 36