This site permanently moved to
https://droidscript.github.io
. Please update links accordingly.
You are being forwarded automatically in 3...
[stay here]
Back
IsBluetoothEnabled
Hello World
Return whether bluetooth was enabled.
app.IsBluetoothEnabled() →
Boolean
See Also:
SetBluetoothEnabled
Example - Check Bluetooth Status
click to expand contents
function
OnStart
(
)
{
var
status
=
app
.
IsBluetoothEnabled
(
)
var
state
=
app
.
IsBluetoothOn
(
)
;
app
.
ShowPopup
(
"Bluetooth is "
+
(
status
?
"enabled"
:
"disabled"
)
+
(
status
==
state
?
" and "
:
" but "
)
+
(
state
?
"on"
:
"off"
)
)
;
}
Copy
Copy All
Run
loading