Turning Bluetooth on/off not working

Post Reply
devnull
Posts: 1
Joined: Tue Jan 27, 2026 12:54 pm

Turning Bluetooth on/off not working

Post by devnull »

Hi,

I’m trying to create an automation related to turning Bluetooth on and off.
The trigger runs correctly, but unfortunately Bluetooth does not turn on.

Image
----
Image

Code: Select all

Android version: 15
Version name: 1.8.4
Version code: 145
Flavor: fdroidFlavor
Device details
OS version: 6.1.99-android14-11-gd7dac4b14270-ab12946699
API Level: 35
Target SDK: 28
Device: vienna
Model: motorola edge 50 neo
Product: vienna_g_syses
Rooted: false
I assume this is not enough information to diagnose the problem.
In the logs I see:

Code: Select all

Tue Jan 27 13:57:37 GMT+01:00 2026: e / Automation / java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@af653134: enable
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3242)
	at android.os.Parcel.createException(Parcel.java:3226)
	at android.os.Parcel.readException(Parcel.java:3209)
	at android.os.Parcel.readException(Parcel.java:3151)
	at android.bluetooth.IBluetoothManager$Stub$Proxy.enable(IBluetoothManager.java:465)
	at android.bluetooth.BluetoothAdapter.enable(BluetoothAdapter.java:1637)
	at com.jens.automation2.Actions.setBluetooth(Actions.java:817)
	at com.jens.automation2.Action.run(Action.java:523)
	at com.jens.automation2.Rule$ActivateRuleTask.activateInternally(Rule.java:532)
	at com.jens.automation2.Rule$ActivateRuleTask.doInBackground(Rule.java:450)
	at com.jens.automation2.Rule$ActivateRuleTask.doInBackground(Rule.java:431)
	at android.os.AsyncTask$3.call(AsyncTask.java:394)
	at java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
	at java.lang.Thread.run(Thread.java:1563)
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.bluetooth.BtPermissionUtils.checkConnectPermissionForDataDelivery(BtPermissionUtils.java:101)
	at com.android.server.bluetooth.BtPermissionUtils.checkBluetoothPermissions(BtPermissionUtils.java:337)
	at com.android.server.bluetooth.BtPermissionUtils.callerCanToggle(BtPermissionUtils.java:124)
	at com.android.server.bluetooth.BluetoothServiceBinder.enable(BluetoothServiceBinder.java:96)
	at android.bluetooth.IBluetoothManager$Stub.onTransact(IBluetoothManager.java:252)
but Android didn't ask me for this permission.

Best regards
Dev
jens
Posts: 6
Joined: Sat Oct 18, 2025 10:15 pm

Re: Turning Bluetooth on/off not working

Post by jens »

Yes. For some reason there are issues with bluetooth permission. In the next release it'll be requested. But for the moment please go to systems settings, apps, Automation, permissions and grant Bluetooth permission manually. That should help. If it doesn't, please let me know.
Post Reply