I found this code to launch the browser with an intent:
Intent intent = new Intent (Intent.ACTION_VIEW, uri);
intent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
intent.setDataAndType(uri, "text/html");
startActivity(intent);
It works.
But i’m not using Android SDK. I’m using Phonegap to make my application.
So i’m looking for a way to launch this intent.
I found this plugin:
https://github.com/borismus/phonegap-plugins/tree/master/Android/WebIntent/
But it does not allow to “setClassName”, “setDataAndType”….
Any ideas ?
If you just want to load a url in the Android browser then you should just use the ChildBrowser plugin:
https://github.com/phonegap/phonegap-plugins/tree/master/Android/ChildBrowser
If you are looking to start any intent then just let me know as the Android PhoneGap code launches all sorts of intents to get work done.