geofencing

Android : Difference between LocationManager.addProximityAlert() & LocationClient.addGeofences()

隐身守侯 提交于 2019-12-21 20:37:33
问题 Both of these serve as a mechanism to notify once the user enters/exits a given point of interest. What are the pros and cons of each ? 回答1: Coming from someone who switched over to Google Play Services a while ago, i can give you some experiences: I have an app, about 2,5 years old, that uses location services extensively. From the outset, of course, we used the LocationManager since that's what was available on the Android platform. We had a pretty bad experience with Location Services on

Unable to display notification when entering GeoFence in Android

大憨熊 提交于 2019-12-21 17:27:09
问题 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

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

五迷三道 提交于 2019-12-21 09:21:58
问题 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

Geofences not working when app is killed

跟風遠走 提交于 2019-12-20 10:40:30
问题 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

Android: How to get the list of users with in same geofence?

帅比萌擦擦* 提交于 2019-12-20 07:55:23
问题 I have 3 Geo-fence locations(circles) stored on Firebase like Geofence_location_1(lat,lng, radius). Geofence_location_2(lat,lng, radius). Geofence_location_3(lat,lng, radius). I am able to get the user's current location and store it in Firebase. Is there a way to figure out if users current location falls with in any of the saved Geo-fence locations? OR Is it possible to get the key of Geo-fence in which the user is present? OR Is there any way to show user the list of all other users

Android: How to get the list of users with in same geofence?

拈花ヽ惹草 提交于 2019-12-20 07:54:13
问题 I have 3 Geo-fence locations(circles) stored on Firebase like Geofence_location_1(lat,lng, radius). Geofence_location_2(lat,lng, radius). Geofence_location_3(lat,lng, radius). I am able to get the user's current location and store it in Firebase. Is there a way to figure out if users current location falls with in any of the saved Geo-fence locations? OR Is it possible to get the key of Geo-fence in which the user is present? OR Is there any way to show user the list of all other users

Permission exception even though permission is set in manifest [duplicate]

江枫思渺然 提交于 2019-12-19 11:39:31
问题 This question already has answers here : Android permission doesn't work even if I have declared it (13 answers) Closed 4 years ago . In my manifest I have: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> However, when I run my app and press the button that needs this permission I get the following exception: Geofence usage requires ACCESS_FINE_LOCATION permission How can I fix this? I have the permission right under <manifest> I am using Android 6. This is my code:

Geofencing in background on Android 8 or 9 does not work

会有一股神秘感。 提交于 2019-12-19 03:14:13
问题 I try to make appear a push alert to the user when he reach a defined zone. So I coded my app from : https://developer.android.com/training/location/geofencing It is working perfectly if my app is running with a service following the location of the user. It also work if I start google map for example, that will track my location too. Pushes will appear. But if I close my app the push won't appear, so the geofencing is not detected if no app is tracking my location. Is it normal ? How to make

Number of “region” monitored by RegionMonitoring, based on users current location in iOS7

断了今生、忘了曾经 提交于 2019-12-18 03:43:08
问题 I am working on such a project where apps do the following things: User select a radius (10 meter to 1000 meter) and go to next viewController by pressing "Go" button Here apps Grab users current position and start "region monitoring" based on that current position with selected radius If the user cross that certain boundary (10 meter to 1000 meter) then it gives an "ExitRegion" alert message. And start "region monitoring" again based on users new current position. And the apps keep doing

Android - Need to add more than 100 geofences

谁说我不能喝 提交于 2019-12-17 18:14:50
问题 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 and it can be hundreds and more. I've read at the given link "You can have multiple active geofences, with a limit of 100 per device user." Is there any way add more then 100 geofences per device user ? Thanks! 回答1: Have an ArrayList with all the