geofencing

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

iOS Geofence, how to handle when inside region when monitoring starts?

…衆ロ難τιáo~ 提交于 2019-12-04 03:17:55
I have been unable to work out how to handle a scenario where the phone is already inside a region when startMonitoringForRegion is called? Other questions have suggested calling requestStateForRegion inside didStartMonitoringForRegion this then calls the method didDetermineState: forRegion: . So the code looks something like this: - (void)viewDidLoad { //location manager set up etc... for (Object *object in allObjects){ CLRegion *region = [self geofenceRegion:object]; [locationManager startMonitoringForRegion:region]; } } - (void)locationManager:(CLLocationManager *)manager

What is the maximum and minimum radius that can be set for regions in iOS geofencing

坚强是说给别人听的谎言 提交于 2019-12-04 00:22:24
I was working on geofencing in iOS. I actually want to set different regions on the map with different radius for each regions. I actually want to know the Min and Max radius for Regions in iOS geofencing. Thanks, In iOS there is no minimum radius specified. Apple says, "The specific threshold distances are determined by the hardware and the location technologies that are currently available. For example, if Wi-Fi is disabled, region monitoring is significantly less accurate. However, for testing purposes, you can assume that the minimum distance is approximately 200 meters." (source: https:/

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

How to notify user when he entered into a Movie theater in android?

大兔子大兔子 提交于 2019-12-03 16:38:14
In my android app i ve map view and current location,nearest theaters displayed now i want to notify user when he entered into a theater(like geofence) i searched on NET and dint find any Android api which supports Geofencing please help how to do it? Note:I tried http://geofence.locationlabs.com/ but not working means API keys are not comig. any example code really helpful Thanks in advance Hey I found the solution Try This, We have to implement PendingIntent & Location Manager. Location Manager obtain the current Location of user and when user entered in some region it will fire a pending

Geofencing : HTTP request failed while sending through the background service. Gives UnknownHostException

妖精的绣舞 提交于 2019-12-03 11:37:48
问题 I implemented Geofence in android application. I followed this link to implement 'Geofence' in app. I am using 'Retrofit' library to call 'HTTP' request. App has following permissions : <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android

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

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