geofencing

How to properly set the Radius of CLRegion?

邮差的信 提交于 2019-12-11 06:58:52
问题 This is my code for creating a geofence: Geofence *geofence = [[Geofence alloc] init]; [geofence setRadius:100.0]; [geofence setIdentifier: @"Fence1"]; [geofence setLocation:currentlocation]; CLRegion *region1 = [[CLCircularRegion alloc] initWithCenter:[geofence.location coordinate] radius:geofence.radius identifier:geofence.identifier]; region1.notifyOnEntry=YES; region1.notifyOnExit=YES; [self.locationManager startMonitoringForRegion:region1]; I could say that, the above code works, meaning

How can i set up a listener that would notify me when my new location is within a polygon(Kind of like geofencing)

夙愿已清 提交于 2019-12-11 04:53:44
问题 Am trying to set up an app that would notify the user when his/her location is with in the polygon. I have read about using polyutils library but have not been successful in implementing them. Here is what i Tried @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {

startMonitoringForRegion is not calling didEnterRegion if the app is started within the region

大城市里の小女人 提交于 2019-12-10 17:37:26
问题 I'm having an issue where my app will not fire the didEnterRegion event if I start the app within the region. If I start the app outside the region and then enter the region, it fires. If I start the app inside the region, then leave the region, then re-enter the region, it fires. Any suggestions on how to get it to fire as soon as the app is opened if it's in the region would be much appreciated! 回答1: I don't think you can do that. But, you can get the current location and check if it's

iOS Region Monitoring not working

寵の児 提交于 2019-12-10 11:34:00
问题 I have been doing some iOS development for a couple of months and recently I am developing a bus app. I am currently mimicking the bus' movements and set up multiple annotations on the bus stops. For test purposes, I have setup just one bus stop and am trying to monitor when the bus has entered this region and exited as well. Strangely, my didStartMonitoringForRegion method is called perfectly but neither the didEnterRegion nor didExitRegion methods are called. Every time I run the program,

Is geofence accuracy dependent on locationManager’s accuracy or distance filter?

倖福魔咒の 提交于 2019-12-10 10:44:11
问题 Is geofence accuracy dependent on locationManager’s accuracy or distance filter? Or they are independent of each other because geofence is managed by the OS and uses Wifi/Cell tower info? For example: locationManager locationManager.distanceFilter = 1250; locationManager.desiredAccuracy = kCLLocationAccuracyKilometer; region let title = "Lorrenzillo's" let coordinate = CLLocationCoordinate2DMake(37.703026, -121.759735) let regionRadius = 550.0 let region = CLCircularRegion(center:

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

岁酱吖の 提交于 2019-12-10 03:45:55
问题 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

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

旧巷老猫 提交于 2019-12-09 14:32:48
问题 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, 回答1: 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,

Is there any API for calculating Geofence breach other than Android API's

跟風遠走 提交于 2019-12-09 02:06:03
问题 I would like to calculate geofence breach and driving distance calculation in the backend. This is my first time using the google API. All I find in the web is are for Android. Is there any API specific to regular calculations. 回答1: You can implement it yourself, without using any frameworks, it's very easy... I presume that you want to check if you're inside a circle geofence or not. To do this, just calculate the distance between the center of the circle and your location (longitude,

Geofence - problem in triggering 'GEOFENCE_NOT_AVAILABLE'

混江龙づ霸主 提交于 2019-12-08 02:25:49
问题 I do app with geofencing use and since I started to work with it I get to broadcastReceiver the transitions and when I turned off the GPS location I got an alert with code GEOFENCE_NOT_AVAILABLE and I started a service to reregister the geofences when I will turn on the GPS. Now I took a few days break and suddenly my broadcastReceiver doesn't get alerts when I turn off the GPS. I don't understand why? *when I enter/exit from location (like I defined in the geofences init) I trigger the

How to have a working Geofence even if the app is not running? [duplicate]

你说的曾经没有我的故事 提交于 2019-12-08 01:54:53
问题 This question already has answers here : Will iOS region monitoring call didEnterRegion on my app if my app is in a terminated state? (2 answers) Closed 5 years ago . I'm creating a location aware application. I was able to create geofences already, when I test it in my iPhone, I noticed that the calllback methods -didEnterRegion and -didExitRegion are being called when the application is running in foreground and background. But when I killed the application (meaning the application state is