Macro to revoke a permission

dukeice

New member
Hello everyone, I'm new here (and solo very dummy)

I am the unfortunate owner of a Samsung S21 who decided to also purchase a Xiaomi S1 Active. Both devices work perfectly on their own and even together, but they don't appreciate someone interfering with them. Let me explain. When I get in the car, the phone connects to the hands-free system (or even with a cable and Android Auto). However, when I want to make or receive a call, the phone acts like Pontius Pilate, meaning it doesn't decide whether to send the call (to the phone or the hands-free system), so it keeps it without an audio connection. In other words, I can answer from the car, but the call is not transferred to either the watch or the hands-free system. Today I also tried with a pair of headphones, same behavior: the voice remains on the phone until I make a choice on the display using the Bluetooth button for the conversation.

I have already tried dissociating and re-associating the devices, adding the priority one last, but nothing worked.

I tried removing Bluetooth calls from the watch, but it didn't work.

I tried force-stopping Mi Fitness, but nothing.

I tried installing apps for Bluetooth priority, but nothing.

I tried to find information on the Samsung forum (where there are dozens of people with a similar problem but with a Huawei smartwatch), but I found nothing, and Samsung seems to wash their hands of it.

The only solution I found is to revoke the Mi Fitness app's permission for phone. However, I only want to do this when I'm in the car or using headphones (or even the intercom in some cases).

Is there a way to create a macro that, once a specific device is connected, revoke phone's permission for the MI Fitness app? Or a macro that, once a specific device is connected, disconnetc another one? t

Thank you very much,

Flavio
 

sampleuserhere

Active member
As far as I'm aware, revoking permission of certain app programmatically can be done with at least two methods.

Running the following shell command pm revoke package_name permission_name with ADB wifi/root privileges or having a device owner app like SecureTask plugin revokes the permission. Neither both is convenient to set-up tough, but still they are doable.

To disconnect another device, you could use Bluetooth Configure action > Disconnect Audio Device. Another plugin that supports similar behaviour is BlueTask (Marco Stornelli) with Connection action.

As for the trigger to run the above approaches, you can use Bluetooth Event trigger > Device Connected.
 
Top