I have created an iphone app that pairs with an Android watch.
Whenever the connection is lost between the devices I send an auto reconnect.
if let array:NSArray = self.centralManager.retrievePeripheralsWithIdentifiers([(reconnectedPeripheral?.identifier)!]){
if array.count > 0 {
let peripherals:CBPeripheral = array[0] as! CBPeripheral
centralManager.connectPeripheral(peripherals, options: nil);
self.scannedPeripheral = peripherals
self.scannedPeripheral?.delegate = self;
scanType = .Reconnect
}
}
I also have a manual reconnect button which lets the user reconnect manually in case auto reconnect doesn't work. Above code is called in case of manual reconnect as well.
What will happen if a connection request is sent to the watch twice? Will the watch receive two connection requests?