ios - My bluetooth peripheral is sometimes not recognized by my iphone in background. Proximo by Kensington works -


I am developing a Bluetooth 4.0 BLE hardware device. It works in a very simple way. This is a single service UUID And advertise an extra special payload that includes 0xFF (manufacturer specific data). This service does not publish any GATT profile data, except service UUID.

The main idea is that when a user comes close to the device, a message should be displayed on the iPhone. I am not trying to create another iBeacon protocol, but this app has a specific purpose will :)

app in the pancreas and it sometimes works when the app is able to "Bluetooth-Central" background mode I UIBackgroundModes to call, especially since the town is in the background, gold Have done .

It is very common that the application does not see ever nodes off Bluetooth hardware, while the app is in the background and the main problem I have for months need help I thought it only iOS works Does.

Now I have purchased a Kensington Proximo Bluetooth tracker FOB, and after some testing I have found out that this device can literally wake up to the iPhone {NSDictionary * option = @ {CBCentralManagerOptionRestoreIdentifierKey (NSDictionary *) launchOptions: : @ "myCentralManagerIdentifier", application (UIApplication *) application didFinishLaunchingWithOptions: (bool) - I'm trying to figure out how to do it

 . CBCentralManagerScanOptionAllowDuplicatesKey: [NSNumberNumber: No]}; Self.manager = [[CBCentralManager alloc] initWithDelegate: Self-quote: zero option: option]; Yes come back } - (Zero) Central Manager: (CBCentralManager *) Central Villestorstate: (NSDictionary *) dict {NSLog (@ "Restore,% @", dict); } - (zero) centralManagerDidUpdateState: (CBCentralManager *) Central {NSDictionary * option = @ {CBCentralManagerOptionRestoreIdentifierKey: @ "myCentralManagerIdentifier", CBCentralManagerScanOptionAllowDuplicatesKey: [NSNumber numberWithBool: NO]}; If (self.manager.state == CBCentralManagerStatePoweredOn) {// Note, the actual UUID has been replaced below: [self.manager scanForPeripheralsWithServices: [NSArray arrayWithObject: [CBUUID UUIDWithString: @ "12345678-1234-1234-1234-123456789012" ]] Options: Options; }} - (zero) centralManager: (CBCentralManager *) central didDiscoverPeripheral: (CBPeripheral *) Peripheral advertisementData: (NSDictionary *) AdvertisementData RSSI: (NSNumber *) RSSI {UILocalNotification * localNotification = [[UILocalNotification alloc] init]; Local notifications. FireDate = [NSDT date with timeworks now: 1]; LocalNotification.alertBody = @ "It's Off!"; Local notification. SoundName = UILocalNotificationDefaultSoundName; Local Notifications.ApplicationsIconBadgeNumber = 1; Local Notification. Timonzone = [Nstefjon Default Timezone]; [[UIApplication shared applicant] schedule local notifications: Local Notification]; NSLog (@ "% @", AdData); }    

check

In short: your app tip in the background Before you scan the device, it has been seen in the device before it is detected. You can connect to a known device by trying to connect it, I think Kensington Tracker does this.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -