geofencing

Android geofencing when app is killed

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 04:39:09
问题 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

Android - Why use pending intents for geofences

此生再无相见时 提交于 2019-12-05 23:27:48
问题 I just finished the tutorial for geofencing on Android (http://developer.android.com/training/location/geofencing.html) and I wonder why the 'callback' for geofences are done via pending intents and not a simple callback interface. If implemented in an activity, one would usually disconnect the location client in onPause() anyway, so previously added geofences would not be tracked either after the application paused/was destroyed, so why a pending intent? Or am I mistaken here? 回答1: I wonder

Android Geofencing - No coming intents?

我怕爱的太早我们不能终老 提交于 2019-12-05 23:01:20
问题 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

Alert when two users/friends are near to each other - Android Proximity

前提是你 提交于 2019-12-05 18:55:38
I tried searching but i couldn't find anything. My Question is " How can i alert 2 or more users if they are nearby each other? " in android using Geo-fencing or something else. Say, If a UserA is in football ground and UserB walking nearby that football ground. Then UserA and UserB automatically gets notification that UserA/UserB are somewhere nearby. Rafique Mohammed Finally after spending a couple of hours thinking, I thought a better way to do this: Setup a database (MySQL,SQL etc) in your server which have users table and location table which have the locations data In Android create a

Geofence iOS8 : Require Background Mode for iOS Geofencing [closed]

和自甴很熟 提交于 2019-12-05 09:07:37
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I have used geofencing in my app. Geofence feature discription: App has two type of functionality while entering or exiting from the region: Reset fence: If user will enter in the region and that region has the functionality of reset fence then app will call one web-service and get the new fence list. This functionality is also should work in background mode. App Open: If user will enter in the region and that

Do Android Geofences remain active until removed/expired or only until my PendingIntent is launched

孤街浪徒 提交于 2019-12-05 04:02:21
I'm about to implement a feature with geofences and before I get any serious work done, I need to know whether geofences remain active after the first transition. The core of the feature is: every time I'm within x meters of point P (call this Area A ), I want Action B to occur. What I need to know is Do I just have to add a geofence with Geofence.NEVER_EXPIRE and rest assured that I will get a PendingIntent every time I enter the specified area regardless of elapsed time, reboots, etc OR Do I have to re-register this geofence once I exit Area A in order to get notified the next time I enter

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

纵然是瞬间 提交于 2019-12-05 01:57:56
问题 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 回答1: Hey I found the solution Try This, We have to implement PendingIntent & Location Manager.

Geofence events not always called

*爱你&永不变心* 提交于 2019-12-04 17:17:53
This is how I add my geofences: public void setGeofenceRequest(Location location) { if (geofences == null) { geofences = new ArrayList<Geofence>(); } geofences.add(new Geofence.Builder() .setRequestId("3") .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_EXIT) .setCircularRegion( location.getLatitude(), location.getLongitude(), PSLocationService.getInstance(context).kPSGeofencingDistanceMedium) .setExpirationDuration(Geofence.NEVER_EXPIRE) .build()); Intent intent = new Intent(context, ReceiveTransitionsBroadcastReceiver.class); PendingIntent pi = PendingIntent.getBroadcast(context, 0, intent,

Swift: Geofencing / geolocations near user location

一世执手 提交于 2019-12-04 14:14:46
Problem: I'm trying to make it so that it uses the user's location all the time and constantly checks to see if it is within 5 miles of the CLLocationCoordinate2D points I have set. If so, it sends a alert if the app is open or a notification if the app is closed. Useful Information: In my project I have 4 swift files: Locations.swift holds the CLLocationCoordinate2D points. Utilities.swift holds a simple alert. UserLocation.swift retrieves and updates the user's location GeoLocationViewController.swift monitors the locations Note: Some code may not be in the right place or relevant, I was

iOS - Geofencing with WiFi turned off

二次信任 提交于 2019-12-04 12:00:57
问题 I have code that creates a geofence on my iPhone that will trigger some code to be executed when didExitRegion gets called. However, I have found that when I have WiFi switched off that didExitRegion never gets triggered. Is WiFi required for monitoring region changes on iOS? My desired accuracy is set to kCLLocationAccuracyHundredMeters. I am testing on iOS 6.1 and iPhone 4. Here is my code for setting up location monitoring: - (id)init { self = [super init]; if (self) { CLLocationManager