diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-06-18 23:37:33 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-06-18 23:37:33 +0200 |
commit | b5d6a0975af0bb6c7607846b72b5c1a574e373ee (patch) | |
tree | 6547ecb279c6d3c8e01a449dba667caa5fdf6b05 | |
parent | 421141e64541a0c6f30b11304209f90545926a4b (diff) |
A requrested feature. How to start a VPN from an external app.
-rw-r--r-- | README.txt | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -12,3 +12,23 @@ Do ndk-build in the root directory of the project. Use eclipse with android plugins to build the project. Optional: Copy minivpn from lib/ to assets (if you want your own compiled version) + + + + +Starting a VPN by name from an external app: + +public class StartOpenVPNActivity extends Activity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + + final String EXTRA_NAME = "de.blinkt.openvpn.shortcutProfileName"; + + Intent shortcutIntent = new Intent(Intent.ACTION_MAIN); + shortcutIntent.setClassName("de.blinkt.openvpn", "de.blinkt.openvpn.LaunchVPN"); + shortcutIntent.putExtra(EXTRA_NAME,"upb ssl"); + startActivity(shortcutIntent); + } +}
\ No newline at end of file |