Estimote / iOS-Fleet-Management-SDK

Estimote Fleet Management SDK for iOS
https://developer.estimote.com
MIT License
1.18k stars 398 forks source link

Exit Region Being call even becon is in region #217

Closed vivekzwt closed 4 years ago

vivekzwt commented 8 years ago

My application is monitoring multiple becons.

Once I entered in any beacon region and stays in same then after sometime

method getting call without leaving region.

Then after didEnterRegion being called and then didExitRegion.

I am fine with multiple call but without leaving region it call didExitRegion

heypiotr commented 8 years ago

https://forums.estimote.com/t/unreliable-region-monitoring-false-positives/3113/2?u=heypiotr

Yes, I've seen that as well, and we got other similar reports too. The problem lies somewhere at the Core Location level, but we've had no luck getting to the bottom of it so far. We're gathering some data to submit a bug report to Apple, maybe you could help us?

Could you try setting the adv interval to 100 ms (Apple's official requirement for "pure/strict" iBeacon)? Could you try enabling the Basic Power Mode and disabling the Smart Power Mode? Does this happen with all of your beacons, or just some specific ones? If there are two iOS devices in range of the beacon, does the problem happen at the same time for both?

vivekzwt commented 8 years ago

I have only one beacon with me so I cant say about that. And I have already disabled smart power mode. For other points I will update you soon.

martinklimek commented 8 years ago

Hi @vivekzwt, any updates?

vivekzwt commented 8 years ago

No @martinklimek . It is still same.

kkdevenda commented 8 years ago

My estimote device is also working in a very unreliable way. Sometimes it does not call func beaconManager(manager: AnyObject, didEnterRegion region: CLBeaconRegion) even when I'm holding it in my hand.

danieltigse commented 7 years ago

@vivekzwt Can you share part of your code to detect multiple beacons? I can Only detect only one. I don't know what to put in major and minor:

self.beaconNotificationsManager.enableNotificationsForBeaconID(
            beaconID: BeaconID(UUIDString: "B9407F30-F5F8-466E-AFF9-25556B57FE6D", major: 65535, minor: 1),
            enterMessage: "Enter message",
            exitMessage: "Exit message"
        )
vivekzwt commented 7 years ago

@kkdevenda When you start application and you are already in beacon's region then sometimes delegate methods will not be called. You have to go out of beacon's region and then again need to enter the beacon region to detect beacon into your application

vivekzwt commented 7 years ago

@danieltigse When you start monitoring region for multiple beacon you need to add beacon's major id and minor id to region object in order to identify your region when you enter in particular. You can get all added beacon detail (major and minor ids) from Estimote API or SDK.

I have added sample code. Cheers..

          NSUUID *bID = [[NSUUID alloc]initWithUUIDString:@"YOURUDIDSTRING"];
         for (ESTBeaconVO *beacon in beaconList)
         {
             CLBeaconRegion *motionRegion = [[CLBeaconRegion alloc] initWithProximityUUID:bID  major:(uint16_t)[beacon.major integerValue]  minor:(uint16_t)[beacon.minor integerValue]   identifier:[NSString stringWithFormat:@"%@",beacon.major]];
             NSLog(@"%d",(uint16_t)[beacon.major integerValue]);
             [nearableManager startMonitoringForRegion:motionRegion];
         }

Where beaconList will be derived from API response of Estimote