It'll depend on you VPN app. You'd rather try with UI Interaction.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.
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.It'll depend on you VPN app. You'd rather try with UI Interaction.
Sorry but I don't know this app. Maybe users using it will be able to help you.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.
With root, which isn't what the user wants. Setting up an adb connection also seems overkill.You can force stop the app in the background
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!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.
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.Have you looked at the Notification Interaction? This action can auto click notification buttons so it may be able to do what you want.