December 28th, 2011, 11:42 PM
|
#1 (permalink)
|
|
ROM Developer
Join Date: Jul 2010
Location: Narnia
Posts: 397
Device(s): Current: HTC Evo
Retired: LG Ally
Thanks: 94
Thanked 142 Times in 93 Posts
|
Launch browser with no specific URL?
I'm trying to find a method to launch whatever browser a user has, but to no specific link. I've been looking all over but I haven't found anything that works. My latest attempt was with this code:
Code:
String packageName = "com.android.browser";
String className = "com.android.browser.BrowserActivity";
Intent internetIntent = new Intent(Intent.ACTION_VIEW);
internetIntent.addCategory(Intent.CATEGORY_LAUNCHER);
internetIntent.setClassName(packageName, className);
startActivity(internetIntent);
As I was copying and pasting that, I just realized that it would launch the stock browser if it worked, so that's not what I want.
Anyone have any ideas on how to launch a browser with no URL?
__________________

(That's a link. Just saying.)
|
|
|