randdusing / cordova-plugin-bluetoothle

Bluetooth Low Energy Phonegap Plugin
804 stars 354 forks source link

bluetoothle.initialize(initializeSuccess, initializeError); #14

Open JohnMcLear opened 10 years ago

JohnMcLear commented 10 years ago

bluetoothle.initialize(initializeSuccess, initializeError); doesn't error if there is no BLE availability on the device. *Was pulling hair out over why code wasn't working..

Heh..

randdusing commented 10 years ago

What type of device and OS version?

JohnMcLear commented 10 years ago

Huwaie p2 ascend or something, just silently fails. Not sure which version of Android but I do know the device doesn't have BLE support

randdusing commented 10 years ago

Hmm, line 332 should prevent that: cordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)

What happens if you add "uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/" surrounded with < and > to your app manifest? It should prevent you from even installing the app on devices that don't support Bluetooth LE

JohnMcLear commented 10 years ago

Adding <uses-permission android:name="android.permission.BLUETOOTH_LE" /> to android manifest still allows install using cordova run

randdusing commented 10 years ago

This phone: http://www.gsmarc.com/huawei/ascend-p2/ ? According to that page, it has Bluetooth 4.0 support, but it comes with Android 4.1.2. Some devices supported Bluetooth 4.0 before Android 4.3, but I think each vendor implemented it separately, which may be leading to the issue.

JohnMcLear commented 10 years ago

Yep that's teh one, it's not a big issue just worth documenting. I have the BLE unlock app available but I haven't rooted this device as it's my daily driver. It's no big deal for me because I have other devices I am hacking with

randdusing commented 8 years ago

@JohnMcLear Do you remember what error you get when calling initialize(), or just no callback at all?

JohnMcLear commented 8 years ago

Na haven't looked at this for months. Sorry dude!

----- Reply message ----- From: "Rand Dusing" notifications@github.com To: "randdusing/cordova-plugin-bluetoothle" cordova-plugin-bluetoothle@noreply.github.com Cc: "John McLear" John@mclear.co Subject: [randdusing/cordova-plugin-bluetoothle] bluetoothle.initialize(initializeSuccess, initializeError); (#14) Date: Tue, Mar 29, 2016 09:05

@JohnMcLearhttps://github.com/JohnMcLear Do you remember what error you get when calling initialize(), or just no callback at all?

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/randdusing/cordova-plugin-bluetoothle/issues/14#issuecomment-202651166

jachstet-sea commented 6 years ago

Could you please change the issue's title to something meaningful? The current description makes it hard to guess what it's actually about.