How to detect if bluetooth is enabled in phone?

Ask, and ye shall receive.
kungjohan
Posts: 4
Joined: 16:09, 09 Dec 2014

How to detect if bluetooth is enabled in phone?

Postby kungjohan » 16:13, 09 Dec 2014

Is there a api call in easyble.js to check if bluetooth is enabled in phone settings?
And if it is not enabled can you enabled it by an addional call?

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: How to detect if bluetooth is enabled in phone?

Postby Fredrik » 14:33, 10 Dec 2014

Normally, if Bluetooth is turned off and you call a Bluetooth function, the user gets asked to turn Bluetooth on. We have reports that, on iOS, this sometimes doesn't happen. We're looking into the issue.

kungjohan
Posts: 4
Joined: 16:09, 09 Dec 2014

Re: How to detect if bluetooth is enabled in phone?

Postby kungjohan » 14:55, 10 Dec 2014

I am running on Ios and I do not get any notification.
But if the expected behaviour is to get a popup I will have to wait for this fix.

I found that there was some other methods in the cordova plugin: https://github.com/don/BluetoothSerial

bluetoothSerial.isEnabled

I was thinking if there were something similar?

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: How to detect if bluetooth is enabled in phone?

Postby Fredrik » 15:36, 10 Dec 2014

Well, we do include BluetoothSerial in our Evothings Client. You could use that.

kungjohan
Posts: 4
Joined: 16:09, 09 Dec 2014

Re: How to detect if bluetooth is enabled in phone?

Postby kungjohan » 10:02, 18 Dec 2014

Reading on the page http://evothings.com/doc/studio/mobile-app.html

It seems like that plugin is only included in Android version.

Is there an instruction on how to add plugins to MacOs/Ios version?

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: How to detect if bluetooth is enabled in phone?

Postby Fredrik » 10:23, 18 Dec 2014

Cordova plugins are added the same way on every platform, but iOS, unfortunately, does not support Classic Bluetooth for apps at all.


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 8 guests