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

563 questions
14
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…
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
  • 1,062
  • 11
  • 20
13
votes
8 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…
13
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
  • 3,785
  • 4
  • 36
  • 63
13
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
  • 937
  • 2
  • 9
  • 25
12
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
  • 794
  • 3
  • 7
  • 27
12
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
  • 33,489
  • 95
  • 256
  • 444
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,688
  • 4
  • 22
  • 35
11
votes
2 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,650
  • 4
  • 20
  • 25
10
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
  • 27,954
  • 13
  • 86
  • 121
10
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…
10
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…
9
votes
0 answers

android studio: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter

I am trying to build a geofencing app using Kotlin in the android studio but the VM crashed then the next run show this error E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.mapgis, PID: 3002 java.lang.NullPointerException: Parameter…
9
votes
0 answers

Android Geofencing- only works when Google maps is running on ANY app

I have implemented the android geofence code as per tutorial: https://www.raywenderlich.com/7372-geofencing-api-tutorial-for-android A weird thing is that the geofence triggers only work when Google maps is running, on any app on device. When my app…
Rowan Gontier
  • 821
  • 9
  • 14
1
2
3
37 38