Launch OpenVPN Connect and import new profile form my appli

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
pinkethan
OpenVpn Newbie
Posts: 3
Joined: Thu May 14, 2015 10:27 am

Launch OpenVPN Connect and import new profile form my appli

Post by pinkethan » Thu May 14, 2015 10:42 am

I am writing a activity, that create a OpenVPN profile, and save it to my application data directory.

I want to launch the OpenVPN Connect form my activity , and import the profile that I just created. Something like "EasyOvpn apk"

I tried this:

Code: Select all

String  profile_name = "the_path_to_my_profile";
final String EXTRA_NAME = "net.openvpn.openvpn.AUTOSTART_PROFILE_NAME";
Intent shortcutIntent = new Intent("android.intent.action.VIEW");
shortcutIntent.setClassName("net.openvpn.openvpn", "net.openvpn.openvpn.OpenVPNClient");
shortcutIntent.putExtra(EXTRA_NAME,profile_name);
It only works when the profile is already exist in the OpenVPN Connect.

Can anyone help me on this? Thanks.

Post Reply