joaomgcd / TaskerSettings

Helper app for Tasker
358 stars 10 forks source link

Workaround for Bluetooth toggle not working #22

Closed VJuric closed 1 year ago

VJuric commented 1 year ago

Workaround for Bluetooth toggle not working, see error message. -> Tasker Setting 1.6

12.43.46/LicenseCheckerTasker Checking cached only 12.43.46/LicenseCheckerTasker cache validity left -1328986 12.43.46/LicenseCheckerTasker Cached status: Licensed 12.43.46/LicenseCheckerTasker Cached only: Licensed 12.43.46/Ew add wait type Bluetooth Status Group time 2147483647 12.43.46/Ew add wait type Bluetooth Status Group done 12.43.46/E add wait task 12.43.47/E Error: null 12.43.47/E Couldn't toggle bluetooth: : java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@acb40b2e: disable at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.bluetooth.IBluetoothManager$Stub$Proxy.disable(IBluetoothManager.java:574) at android.bluetooth.BluetoothAdapter.disable(BluetoothAdapter.java:1611) at android.bluetooth.BluetoothAdapter.disable(BluetoothAdapter.java:1592) at com.joaomgcd.taskersettings.actions.ActionToggleBluetooth.j(Unknown Source:25) at n.a$d.e(Unknown Source:34) at n.a$d.a(Unknown Source:0) at l.b.k(Unknown Source:5) at l.b.a(Unknown Source:0) at l.a.call(Unknown Source:2) at x.a.k(Unknown Source:7) at q.b.b(Unknown Source:14) at x.d.k(Unknown Source:9) at q.b.b(Unknown Source:14) at x.f$a.run(Unknown Source:2) at q.a$a.run(Unknown Source:9) at y.i.run(Unknown Source:13) at y.i.call(Unknown Source:0) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.bluetooth.BluetoothManagerService.checkPermissionForDataDelivery(BluetoothManagerService.java:3467) at com.android.server.bluetooth.BluetoothManagerService.checkConnectPermissionForDataDelivery(BluetoothManagerService.java:3485) at com.android.server.bluetooth.BluetoothManagerService.checkBluetoothPermissions(BluetoothManagerService.java:1298) at com.android.server.bluetooth.BluetoothManagerService.disable(BluetoothManagerService.java:1579) at android.bluetooth.IBluetoothManager$Stub.onTransact(IBluetoothManager.java:307)

joaomgcd commented 1 year ago

Can you try enabling the Nearby Devices permission in Tasker Settings and see if that works?

VJuric commented 1 year ago

Where can I find the "Nearby devices" permission in Tasker settings? Can you show me by screenshot?

joaomgcd commented 1 year ago

Android Settings > Apps > Tasker Settings > Permissions.

VJuric commented 1 year ago

Has already been activated.

joaomgcd commented 1 year ago

Can you try disabling and re-enabling all permissions there? Thanks

VJuric commented 1 year ago

I've just tried it and it works.

joaomgcd commented 1 year ago

Great :)

VJuric commented 1 year ago

Is the Huawei version a brand specific?

VJuric commented 1 year ago

Because I am on Pixel 7 Pro.

joaomgcd commented 1 year ago

It's not. It just has a difference that fixes an issue on Huawei devices. It can also work on other devices.