• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Launch browser with no specific URL?

cr5315

Android Enthusiast
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?
 
Back
Top Bottom