How to set up an action to turn off vpn without root?

kantkk

New member
maybe using intent, but i don't know how to write a intent to do this, need a help, thanks!! I'm using vpn with clash.
 
Last edited:

kantkk

New member
It'll depend on you VPN app. You'd rather try with UI Interaction.
Thanks for the answer, I use clash to connect to the vpn, using ui interaction I don't think it's automated enough, would prefer to set it up to close in the background like that.
 

Dm114

Well-known member
Thanks for the answer, I use clash to connect to the vpn, using ui interaction I don't think it's automated enough, would prefer to set it up to close in the background like that.
Sorry but I don't know this app. Maybe users using it will be able to help you.
 

Endercraft

Moderator (& bug finder :D)
You can force stop the app in the background
With root, which isn't what the user wants. Setting up an adb connection also seems overkill.
@kantkk Is there a notification that appears with a button to turn off the vpn? If so MacroDroid can interact with it and disable the vpn that way.
 

kantkk

New member
With root, which isn't what the user wants. Setting up an adb connection also seems overkill.
@kantkk Is there a notification that appears with a button to turn off the vpn? If so MacroDroid can interact with it and disable the vpn that way.
The phone's status bar allows me to turn vpn on and off, but this is supposed to require a UI action? It may can't be turned off in the background. By the way, I've turned on adb debugging, but it doesn't seem to have permission to close the app when it's turned on. Thank you all for your patience in answering this!:D
 

MacroDroidDev

Administrator
Staff member
Have you looked at the Notification Interaction? This action can auto click notification buttons so it may be able to do what you want.
 

kantkk

New member
Have you looked at the Notification Interaction? This action can auto click notification buttons so it may be able to do what you want.
There is no button in the notification bar to close. I now use the UI interaction to close the software. It works well, thank you.
 
Top