I have been looking around for a way to launch the VPN settings activity through my android app, but cannot find it. Note that I am targeting Android 2.2, hence will not be able to use the facilities provided in android ICS.
What is the action that I should pass into an Intent in order to get the VPN settings screen to open up ?
I think this is what you are looking for:
Intent intent = new Intent("android.net.vpn.SETTINGS");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
try this:
private static final String PACKAGE_PREFIX =
VpnManager.class.getPackage().getName() + ".";
private static final String ACTION_VPN_SETTINGS =
PACKAGE_PREFIX + "SETTINGS";
Intent intent = new Intent(ACTION_VPN_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With