I have the same problem. It just opens the App and shows me the profile. Any solutions for this?
I am having more success using intents and Open VPN Connect App (not Open VPN for Android app)
I have the same problem. It just opens the App and shows me the profile. Any solutions for this?
I am having more success using intents and Open VPN Connect App (not Open VPN for Android app)
Could you share your profile? I cannot get it to work with OpenVPN Connect.
My apologies that I can't really explain at all how this works, it was all trial and error to put together. It does work 99% of the time though for me, which has made me happy. If you know of an easier way for me to share these let me know and I'll try that too.
<Str sr="arg0" ve="3">net.openvpn.openvpn.CONNECT</Str>
<Int sr="arg1" val="0"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3">net.openvpn.openvpn.AUTOSTART_PROFILE_NAME: PC openvpnprofilename</Str>
<Str sr="arg5" ve="3">net.openvpn.openvpn.AUTOCONNECT: true</Str>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3">net.openvpn.openvpn</Str>
<Str sr="arg8" ve="3">net.openvpn.unified.MainActivity</Str>
<Int sr="arg9" val="1"/>
No worries, thanks for your reply? I figured it out now, had a typo in one the intent parameters. Here's the intent, it works with the current version of OpenVPNConnect:
Code:<Str sr="arg0" ve="3">net.openvpn.openvpn.CONNECT</Str> <Int sr="arg1" val="0"/> <Str sr="arg2" ve="3"/> <Str sr="arg3" ve="3"/> <Str sr="arg4" ve="3">net.openvpn.openvpn.AUTOSTART_PROFILE_NAME: PC openvpnprofilename</Str> <Str sr="arg5" ve="3">net.openvpn.openvpn.AUTOCONNECT: true</Str> <Str sr="arg6" ve="3"/> <Str sr="arg7" ve="3">net.openvpn.openvpn</Str> <Str sr="arg8" ve="3">net.openvpn.unified.MainActivity</Str> <Int sr="arg9" val="1"/>
In order of easiest to import;Oh gosh yeah I would love to, is there an easy way to export it out of Tasker and paste it into here? I'm still a noob. Otherwise I will type out my solution like this:
I have three profiles, as below, with 4 different tasks.
-------------------------------------------------------------------
Wifi Connected > VPN Connect Intent
VPN Disconnect Intent
Wifi Connected + Not VPN Connected > VPN Connect (note this is not my intent task)
Not Wifi Connected > VPN Disconnect (not this is not my intent task either)
-----------------------------------------------------------------------
Tasks:
VPN Connect = OpenVPN Configuration Connect and connect to my VPN
VPN Disconnect = OpenVPN Configuration Disconnect
VPN Connect Intent=
1. Send Intent
Action net.openvpn.openvpn.connect
2. Wait
4 seconds
3. Go Home
Page 0
4. Go Home
Page 0
VPN Disconnect Intent=
VPN Connect Intent=
1. Send Intent
Action net.openvpn.openvpn.disconnect
2. Wait
4 seconds
3. Go Home
Page 0
4. Go Home
Page 0
------------------------------------------------------------------------------
My apologies that I can't really explain at all how this works, it was all trial and error to put together. It does work 99% of the time though for me, which has made me happy. If you know of an easier way for me to share these let me know and I'll try that too.
Send Intent
Action:android.intent.action.MAIN
Cat:None
Extra:de.blinkt.openvpn.shortcutProfileName:PROFILENAME
Package:de.blinkt.openvpn
Class:de.blinkt.openvpn.LaunchVPN
Target:Activity
I was using: wait 1 second and go home.First of all, thank you for this post.
Currently I'm using "go home" to "close" open vpn after disconnect.
Latest change log says "* added minimize app on disconnect shortcut feature"
Do you think we can use it in Tasker somehow to natively minimize the app after disconnect?