Are VPN connectivity based permissions possible?

22 views
Skip to first unread message

amga...@gmail.com

unread,
Feb 21, 2019, 12:57:25 PM2/21/19
to Automate
I would like to configure my phone to behave in one of the following ways. The options are ranked by preference.
  1. App x may only use / connect via wifi or mobile data if the VPN app has a successful connection established.
  2. Apps must be granted explicit permission to connect via wifi or mobile data when VPN does app does not have a successful connection.  Permission expires after 30 min.
  3. When VPN disconnects or quits phone automatically goes into airplane mode
Thanks for your help.

Henrik "The Developer" Lindqvist

unread,
Feb 21, 2019, 3:54:16 PM2/21/19
to Automate
Will be difficult unless the VPN app support automation. Automate has no way of knowing VPN connections.

pete...@gmail.com

unread,
Feb 22, 2019, 2:21:17 AM2/22/19
to Automate
The only way I have been able to do things like this is by reading the notifications from the vpn apps with automate. For example, with betternet I use notification posted? block on the "android" package and on the output text I use an expression block to see if the notification title contains a certain text like... contains(Title, "activated by Betternet") and for the Opera VPN it would be... contains(Title, "activated by Opera") ... for me I would start the vpn when certain apps were in the foreground or when a certain app's notification is posted then would kill the vpn app when the app that needed vpn access was not in the foreground or the notification was off. Perhaps this will get you started on doing what you need.
Reply all
Reply to author
Forward
0 new messages