android-geofence

not able to get alert in geofencing

萝らか妹 提交于 2019-12-04 12:34:19
I have run a sample of Geofence and I have assigned two set of Lat , Lng and radius and run the sample. When I tap over register geofence I am getting following things in my log Location Services is available Client connected Add Geofences: Success GeofenceRequestIds=[1, 2] com.example.android.geofence.ACTION_GEOFENCES_ADDED but nothing happens after that, I don't know what the issue I am passed the current location by enabling gps but no effect. I don't know when I am gonna get the notification when a fence is crossed, to test it I have passed the same geo coordinates that are in fencing but

Android geofencing when app is killed

孤人 提交于 2019-12-04 11:05:45
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 this seems pretty clear to me, the Android documentation is dense so I managed to understand how to start a service with its own process, and also how it is able to communicate with the app using Messenger. Then there is this code sample from Google showing how to use geofencing with google play services: Google samples geofencing What I found so

Unable to display notification when entering GeoFence in Android

佐手、 提交于 2019-12-04 10:02:57
I am working on GeoFencing in Android and I am stuck at one point. My task is to show notification to user when he enters/exits a Geofence area defined by me. Here is my code: Activity class public class TestMapActivity extends FragmentActivity implements OnMarkerDragListener,ConnectionCallbacks, OnConnectionFailedListener,OnAddGeofencesResultListener { private static GoogleMap map; private LocationClient mLocationClient; private PendingIntent mGeofencePendingIntent; private SimpleGeoFence fence; private List<Geofence> mGeoList; private LocationRequest localRequest; private GeofenceReceiver

Android Geofencing - No coming intents?

别来无恙 提交于 2019-12-04 06:14:28
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. Never. With great, accurate GPS fix, standing in the middle of fence. Nothing. Nothing suspicious in logs. No errors, no warnings. No itents come, the service does not start. Have anyone ever seen such a thing? (It is weird because I can't see any connection between devices which work and devices that does not. It's not manufacturer, it's not Android

addProximityAlert doesn't work as expected

我的梦境 提交于 2019-12-03 17:26:06
ios sdk has great region monitoring functions. I need something like that in android and i think we have two alternatives. Geofencing and LocationManager. Geofencing has really tidy examples and bugs , so i prefered LocationManager. Everyting works fine in LocationManager except one. If you add your current location as ProximityAlert , it immediatly fires "ENTERING" , but it is my current location , it doesnt mean that i entered this region. Because of that , it fires "ENTERING" each time i start my application if i am in region.(Even if i am not moving) How can i solve this problem and fire

Android Geofence not triggers once location OFF and ON again [duplicate]

我的未来我决定 提交于 2019-12-03 09:05:59
This question already has an answer here: How to check if Location Services are enabled? 18 answers I am using Android Geofencing API.After add geofence it works fine when location is ON.But If I OFF location and ON again,afterwards Geofencing not triggers when enter or exit.I have tested on my Moto G with Android 5.0.2 device. Is it Geofence will expire If location is off? I have seen on Android document as, In case network location provider is disabled by the user, the geofence service will stop updating, all registered geofences will be removed and an intent is generated by the provided

Geofence transition PendingIntent blocked by the OS on Android Oreo

寵の児 提交于 2019-12-03 08:00:37
问题 This only happens on Android Oreo. I'm using Play Services 11.4.2. I'm registering geofences using the GeofencingClient and the addGeofences method with a pendingIntent to an IntentService that is handling geofence transitions. It looks like the intent sent by the play services is blocked by the OS in certain conditions. The system logs the following: Background start not allowed: service Intent { cmp=my.app.id/my.package.struct.GeofenceTransIntentService (has extras) } to my.app.id/my

New Android Geofence Api - Sample code does not alert/notify when at location

a 夏天 提交于 2019-12-03 04:00:01
I need some clarity on the sample code supplied with Geofence guide as posted here : https://developer.android.com/training/location/geofencing.html I ran the code and I see that geofences are created correctly, but what I really want is a way to get alerted when I drive to those geofenced locations. Right now, when I go past those geofenced spots, nothing happens (ReceiveTransitionsIntentService does not get called), no notifications nothing. Do I also have to listen to periodic location updates and pass lat/lng to the above piece of code manually to indicate my current location? I thought

GeoFence Device when app is in background

坚强是说给别人听的谎言 提交于 2019-12-03 03:24:54
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 geofenced area. I have implemented the GeofenceTransitionsIntentService as per guideline but it is not triggering the transition when the app is in background. What should I need to do? GeoFence Expire time: it is pretty obvious that if we enter Never it is not going to expire, but I am confused about the time. For example if I set it to 10 minutes, what

Geofences not working when app is killed

不打扰是莪最后的温柔 提交于 2019-12-02 23:49:36
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 geofences. I am testing the app from within the geofence, but my smartphone receives notifications every time the app runs and no notifications are observed when the app is killed. Why does this happen? I think I am supposed to receive notifications even when the app is killed. MainActivity public class MainActivity extends ActionBarActivity { @Override