How to start OpenVPN connection?

I am attempting to start a VPN connection with the OpenVPN client when leaving my home network. I am however not managing to get it working (Android 13). I found this user-made automation (Start / Stop OpenVPN Connect ⋅ Community ⋅ Automate for Android) but it does not work for me (yes I edited the profile name in the connection block). It fails with the following exception:
“android.content.ActivityNotFoundException: Unable to find explicit activity class {net.openvpn.openvpn/net.openvpn.openvpn.OpenVPNClient}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared ?”

Anyone managed to get this working?

Using this tasker plugin will probably be your best bet, that’s if it works with A13. It’s what I use and I’m on A12L.

Hi, yes I have something like this working on an android 10 phone and openvpn server at my home.

If I remember correctly:

  1. Install the actuall client on your phone first - it’s OpenVPN for Android
  1. Open the vpn client and import your profile from the server for the user you will connect with.

  2. Test first still in the VPN Client the connection works.

  3. When the connection works in the client, go to automate and under “apps shortcut start” you will now see “OpenVPN Shortcut” - if you click it, you will see your profile you imported to the VPN Client on the phone.

Run the item and it will initiate a connection. It’s working for me.

Thanks but that’s a separate automation app, I kinda need to integrate what I want to do into Automate

Have you never used a tasker plugin? It’s basically an external app that works as a functionality extension with any automation app. It will work with automate, use the Plug-in action block and this plugin will control your openvpn for Android connections with whatever action you want.

Oh that I did not know, thanks for the suggestion then, will try it out!

Hey no problem, hopefully it works