geofencing

BackgroundTaskBuilder Register() issue

懵懂的女人 提交于 2020-03-23 18:21:56
问题 I was developing application with Geofencing, when stuck at issue: ArgumentException (Value does not fall within the expected range) when I am trying to register background task for geofencing. Sample from MSDN has the same problem. I will show code from sample for clarity (link to sample: http://code.msdn.microsoft.com/windowsapps/Geolocation-2483de66#content use scenario 5, http://msdn.microsoft.com/en-us/library/windows/apps/dn440583.aspx - instruction how to test). All what I have done:

Leaflet geofence on multiple circles … detecting marker inside / outside

余生颓废 提交于 2020-01-14 05:51:06
问题 I have some code that detects when the market is dragged inside and outside of a circle. This works great but I was just wondering how I can have one market and multiple circles detected instead of just one. Here is the current code: var mymap = L.map('mapid', { center: [50.895763, -1.150556], zoom: 16 }); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoic3RldmVuc2F0Y2giLCJhIjoiY2p5eDR6MWgzMHRvbjNocnJkN2d2MjRwaSJ9.wd0OtBUQQfUtNxdduQA3lg', { maxZoom: 18

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

こ雲淡風輕ζ 提交于 2020-01-12 03:51:32
问题 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

addProximityAlert doesn't work as expected

北慕城南 提交于 2020-01-01 06:42: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

How to check for Mock Location in Android Marshmallow?

…衆ロ難τιáo~ 提交于 2019-12-29 04:47:27
问题 How to detect if the location is triggered with Mock Location in Android Marshmallow ? Previously, I used Settings.Secure.ALLOW_MOCK_LOCATION But, in API level 23, this has been deprecated. I want to check if the trigger is with Fake location or original GPS ? Now, what is the alternative to check if Mock Location is enabled or not Android Marshmallow ? 回答1: If you are using FusedLocationProviderApi and have set mock location using setMockLocation(mGoogleApiClient, fakeLocation); in the

Create Geofence while storing the location to the sqlite database [duplicate]

半世苍凉 提交于 2019-12-25 03:59:31
问题 This question already has answers here : SQlite Getting nearest locations (with latitude and longitude) (7 answers) Closed 3 years ago . I am developing windows mobile application. I want to create geofence when storing the location to the sqlite database to generate SMS alerts when entering to the geofence. I am loading the location to the text boxes through map. This is the code so far private void Load_Location(object sender, RoutedEventArgs e) { LattxtBx.Text = String.Format("{0}",

CLLocationManager startMonitoringForRegion: not relaunching app after device restart

两盒软妹~` 提交于 2019-12-24 05:06:22
问题 Ok, so I currently have an app where I register a geofence to be monitored using the CLLocationManager startMonitoringForRegion method. This works fine when the app is in the foreground and background. I also have the appropriate plist values set: UIBackgroundModes :{location} UIRequiredDeviceCapabilities: {location-services} What doesn't work After a device restart, the app is not being relaunched. I can force this to happen if I set startMonitoringSignificantLocationChanges before entering

CLLocationManager startMonitoringForRegion: not relaunching app after device restart

本小妞迷上赌 提交于 2019-12-24 05:06:06
问题 Ok, so I currently have an app where I register a geofence to be monitored using the CLLocationManager startMonitoringForRegion method. This works fine when the app is in the foreground and background. I also have the appropriate plist values set: UIBackgroundModes :{location} UIRequiredDeviceCapabilities: {location-services} What doesn't work After a device restart, the app is not being relaunched. I can force this to happen if I set startMonitoringSignificantLocationChanges before entering

PHP: How to create a Geo-Fence(bounding Box) using the Distance from a set of Coords

北战南征 提交于 2019-12-23 19:15:26
问题 How would i create the points of a Geo-Fence(bounding box) using lat and lon and a distance. I have the lat and lon of the center point I have the geofence distance. What would the logic be to create the geo-fence around these multiple points? thanks for any help. 回答1: 1 Convert center lat / lon to cartesian (x,y) in units meter. Then you do all geometry as you have learned in school: 2 Create one corner point of the square, using polar coordinates formula phi = 45 * TO_RADIANS; corner.x =

GeoFence alert does not show

邮差的信 提交于 2019-12-23 04:26:22
问题 After adding a geofence using below code, Notification is not showing.Even onResult callback is returing the success. Adding geofence in GoogleApiClientApi onConnected() callback method: public void onConnected(Bundle bundle) { LocationServices.GeofencingApi.addGeofences( googleApiClient, getGeofencingRequest(), getGeofencePendingIntent() ).setResultCallback(this); } Requesting Geofence: private GeofencingRequest getGeofencingRequest() { geoFenceList.add(new Geofence.Builder() .setRequestId(