Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phonegap Build 2.0.0 isConnected works for Android but not IOS #130

Closed
diverJohn opened this issue Jan 28, 2015 · 3 comments
Closed

Phonegap Build 2.0.0 isConnected works for Android but not IOS #130

diverJohn opened this issue Jan 28, 2015 · 3 comments
Labels

Comments

@diverJohn
Copy link

Rand,

I'm currently using Phonegap 3.6.3 and trying to upgrade from your plugin version 1.0.6 to 2.0.0 and ran into a problem using the 'isConnected' function. The 'isConnected' worked for both Android and IOS in version 1.0.6 but in version 2.0.0 it returns false for IOS when connected.

Code snippet:
function BluetoothLoop()
{
var paramsObj = {"address":btAddr}; // btAddr filled from scan.
bluetoothle.isConnected( isConnectedCallback, paramsObj );
}

function isConnectedCallback(obj)
{
PrintLog(10, "BT: isConnectedCallback: " + JSON.stringify(obj) );
}

Android (4.4.2):
Scan result: {"advertisement":"AgEGEQYbxdWlAgAttOMRAPBgCtZIB/8AAQECJSkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","status":"scanResult","address":"D0:5F:B8:44:4A:E1","rssi":-55}

isConnected callback result: {"address":"D0:5F:B8:44:4A:E1","isConnected":true}

IOS (7.0.2):
Scan result: {"status":"scanResult","name":"Nextivity Bridge","advertisement":"AAEBAiUp","address":"1CFBDB83-B643-F9DC-1425-493C4A549F64","rssi":-53}

isConnected callback result: {"isConnected":false,"name":"Nextivity Bridge","address":"1CFBDB83-B643-F9DC-1425-493C4A549F64"}

Thanks,
John

@randdusing randdusing added the bug label Jan 29, 2015
@mpedersen15
Copy link

I'm seeing this behavior as well. Though, when my BLE device IS NOT connected on iOS, isConnected is returning TRUE. So in the short term, it looks like you could do platform specific callbacks that flip flop the true and false?

@randdusing
Copy link
Owner

Not sure how this one got by... Will be fixed shortly.

@randdusing
Copy link
Owner

Should be good to go now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants