Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old December 28th, 2011, 11:42 PM   #1 (permalink)
ROM Developer
 
cr5315's Avatar
 
Join Date: Jul 2010
Location: Narnia
Posts: 397
 
Device(s): Current: HTC Evo Retired: LG Ally
Thanks: 94
Thanked 142 Times in 93 Posts
Question 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.)
cr5315 is online now  
Reply With Quote
Sponsors
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 11:59 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo