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

Find the closest point on polygon to user location

I have an app that find the shortest distance between my user to a polygon. I want to convert the polygon to Geofence to check the distance between the user to the area to give mor accurate information to the user. how can I do that? this is the…
Codey
  • 460
  • 1
  • 8
  • 23
5
votes
3 answers

Android, Display alertDialog instead of notification when app is open

I followed this developer tutorial, and have Geofencing working within my app, as expected. A notification is sent when a Geofence Transition occurs, from within an IntentService: @Override protected void onHandleIntent(Intent intent) { …
5
votes
1 answer

How to make geofences accurate?

I have a problem in the accuracy of geofences because user's location is mostly determined by mobile networks which sucks completely. My app uses geofences around selected places that will perform some action when the user enters these places...I…
5
votes
0 answers

My GeofenceTransitionsIntentService does not send any notifications when a geofence transition occurs

I am trying to implement a feature for adding and monitoring geofences and I thought that, this tutorial is the best one to start with. I have done everything like they disribed, and it works but not like I would like to. I have noticed that…
amsalk
  • 577
  • 1
  • 5
  • 23
5
votes
1 answer

Android - Need to add more than 100 geofences

I'm developing an application where user can set multiple locations. I get succeed to show notifications when user get Enter or Leave specific region using GeoFencing. Now, there is situation that i need to provide monitoring for all saved locations…
Naitik
  • 796
  • 11
  • 32
5
votes
3 answers

Android geofencing when app is killed

My main requirement would be to have a service having its own process and trigger its own geofencing event. I'd like the user to be notified from the notification center when he enters a geofence, even if the app is killed. I read about services and…
Tíbó
  • 1,188
  • 13
  • 28
5
votes
1 answer

getTriggeringGeofences and getGeofenceTransition from LocationServices

I noticed that the LocationClient class has currently been deprecated. I was using it for a travel app. and I changed the logic to use LocationServices instead of…
5
votes
2 answers

Remove Geofence after triggered

I use Geofences in my app, everything works fine except the removal of triggered geofences. I red the guide from the official documentation of Android but they don't explain how to remove a geofence inside of the IntentService. Here is the code of…
Gp2mv3
  • 1,435
  • 20
  • 33
5
votes
2 answers

How to change the shape of a Geofence

The new Location API in Google allows for creating and monitoring a Geofence that's a circular region with the Geofence.Builder class. This class only has methods defined for creating a geofence with a circular shape. I was wondering if it was…
4
votes
1 answer

How to notify the calling activity from a BroadcastReceiver when using Geofencing

I have defined a BroacastReceiver according to the Geofencing docs in order to receive ENTRY & EXIT updates when the user interacts with a geofence. My issue is that the app is going to be used on the road so, when a user drives and enters a…
4
votes
2 answers

Android Geofencingclient ApiException 1004:

I have been trying to implement Geofencing for an android app, and right now after initializing the GeoFenceRequest as per Google's Documentation and then adding it with the GeoFencingClient geofencingClient.addGeofences(geoFenceRequest,…
Mahmoud Omara
  • 533
  • 6
  • 22
4
votes
1 answer

Google Geofence Not triggered On Some Devices as expected

At present i am developing an app to track end users' movement to do some operation accordingly. Like when end users enter some geofence areas, a notification would pop up to tell them some info relate to that spot. In these phones like "Google…
lulalagulu
  • 139
  • 5
4
votes
1 answer

How to deal with background geofencing in 2022?

Here is the situation: When a user creates a Geofence, I save it to backend and I register a Geofence with the OS. But whenever my app restarts I fetch geofences from my backend and reregister them with the OS again, since they keep disappearing. I…
Marci-man
  • 2,113
  • 3
  • 28
  • 76
4
votes
2 answers

Android Geofencing Not Triggering in some mobile like OnePlus, Xiaomi etc

Am using Geo-fencing code under guidelines of Android document. Tested in Real device such as Sony XA1, Samsung J7 Nxt, Xiaomi 5A, Poco f1, OnePlus 6. Geo-fencing Enter and Exit are working Properly in Sony XA1, Samsung J7 Nxt. Issues in Xiaomi &…
Yugesh
  • 4,030
  • 9
  • 57
  • 97
4
votes
1 answer

set start time to monitoring geofence

According to Google Geofence API example here Geofencing Example Google API you can set the expirationDurationTime, when you add a geofence object. How can I set the time for start Geofence Monitoring in Android ? Example: I want to have a geofence…
user7112196
  • 87
  • 2
  • 9