Launch OpenVPN Connect and import new profile form my appli
Posted: 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:
It only works when the profile is already exist in the OpenVPN Connect.
Can anyone help me on this? Thanks.
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);
Can anyone help me on this? Thanks.