cbperipheral

I want to trigger iOS7 to ask users permission to use Bluetooth and Twitter account

こ雲淡風輕ζ 提交于 2019-12-01 06:49:12
问题 This is somewhat backward to what most people ask. I want to purposely trigger the dialog asking for the users permission to: Connect to bluetooth devices, even when offline. Access there iOS-based Twitter account. I already have a similar dialog for location working fine. I'm doing this because I want to make the process of asking permission a bit more gentle, like Heyday, by showing a welcome screen explaining why the app needs this service then when the user taps OK, initiating the request

CoreBluetooth device name change

时光怂恿深爱的人放手 提交于 2019-11-30 18:52:11
问题 I am currently creating a simple iOS bluetooth app. I currently have a device with the ability to modify the name. What I am finding is that when I connect to a CBPeripheral device, it seems to be caching the old device name. Connect to the device via my app. Disconnect from device via my app. Change the name of the device. Rediscover/reconnect to the device via my app (with an existing CBPeripheral object). By following the procedure above, I was expecting my iOS app to discover the new

iOS6: CBPeripheral is being dealloc'ed while connecting

瘦欲@ 提交于 2019-11-30 14:46:12
问题 I'm trying to connect to a bluetooth BTLE device. I have no problem discovering the peripheral. However, when I attempt to connect to the peripheral, I received the following warning. 2013-04-05 22:10:36.110 CoreBluetooth[WARNING] 7DA9E322-D710-081B-4A9D-526DE546B13C, Name = "Find My Car Smarter", IsConnected = NO> is being dealloc'ed while connecting Furthermore, neither of the relevant delegate methods are called: didConnectPeripheral: didFailToConnectPeripheral: I've been struggling with

Bluetooth Peripheral ADVERTISE_FAILED_DATA_TOO_LARGE

不问归期 提交于 2019-11-30 12:12:22
I am trying to advertise in NEXUS 9 and getting the error of ADVERTISE_FAILED_DATA_TOO_LARGE. It was working perfectly fine when I was adding the service after successfully advertising but if I add the service through Advertise Data builder so that other devices can filter while scanning, I get error code 1 i.e ADVERTISE_FAILED_DATA_TOO_LARGE a) Working Code public void startAdvertisingService() { AdvertiseSettings settings = new AdvertiseSettings.Builder() .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH) .setTimeout(0) .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY)

iOS6: CBPeripheral is being dealloc'ed while connecting

纵饮孤独 提交于 2019-11-30 11:41:21
I'm trying to connect to a bluetooth BTLE device. I have no problem discovering the peripheral. However, when I attempt to connect to the peripheral, I received the following warning. 2013-04-05 22:10:36.110 CoreBluetooth[WARNING] 7DA9E322-D710-081B-4A9D-526DE546B13C, Name = "Find My Car Smarter", IsConnected = NO> is being dealloc'ed while connecting Furthermore, neither of the relevant delegate methods are called: didConnectPeripheral: didFailToConnectPeripheral: I've been struggling with this for hours... Please help. Short answer: You need to retain the peripheral. Long explanation: Core

Not able to scan Through CBCentral Manager with service ID for iBecon Signal

走远了吗. 提交于 2019-11-29 16:32:58
Working on iBecon signal using Core Bluetooth i am able to search with CBCentralManager scan optionn nil :- Shared.sharedInstance.centralManager?.scanForPeripherals(withServices: nil, options:[CBCentralManagerScanOptionAllowDuplicatesKey:true]) But when i provide my desirable service ID i.e :- Shared.sharedInstance.centralManager?.scanForPeripherals(withServices: [serviceID], options:[CBCentralManagerScanOptionAllowDuplicatesKey:true]) it never calls didDiscoverPeripheral Delegate method, I need to scan the peripheral in background mode too and according to apple documentation you need to