简体   繁体   中英

Browser not launching by default - Complete Action Using dialog appears

I have a button that goes to a URL and have enabled internet permission in the manifest:

<uses-permission android:name="android.permission.INTERNET" /> 

However, the browser does not start in the emulator. Instead, I get a "Complete Action Using" dialog (choices: application info, application hardware preferences, call settings, process information.) I have tried the browser in the emulator and it does pull up Google, so I know the browser works on it's own. When I run it on my phone (LG Gossip Pro), the Complete Action Using dialog asks me if I want to use things like Facebook, Twitter, and other installed apps, but not the browser. The code for the button event is:

View.OnClickListener button2clickhandler = new View.OnClickListener() {
    public void onClick(View v) {
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.ratenroll.com")));
    }
  };

Why would the browser not be launching by default in the emulator or on the phone? Is there an alternate way to make sure the browser launches by default through the manifest as I cannot locate any setting in the emulator or phone to do so? I tried Numair's suggestion and the browser is not launching. Any suggestions?

Thanks for looking.

Try this

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.ratenroll.com"));
                startActivity(browserIntent);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM