with android 2.x i could use the solution
browserIntent.setClassName("com.android.browser", "com.android.browser.BrowserActivity")
resolved in the post:
opening local html file with Android Browser
but with android 3.2 i have this error:
Unable to find explicit activity class
(com.android.browser/com.android.browser.BrowserActivity);
have you declared this activity in your AndroidManifest.xml?
I think that the class com.android.browser.BrowserActivity
doesn't exist in Android 3.x
Any solution?
Will open whatever app has the packagename "com.android.browser". The issue with using this is that over various versions of android and various manufacturers, the default browser changes. For example Nexus devices tend to come pre-installed with the chrome app, which has a different package name.
The error you have copied explains that there is no application with that package name browserIntent.setClassName() is used to open a specific app explicitly which means it shouldn't provide a prompt asking which browser you would like to use.
If this is what you want to avoid (pop up), then you can check what browsers are on the device and possibly suggest downloading it before making links clickable.
you also could use the code from the other suggestion.
This specifies that you want to open an activity that can handle the "text/html" type data. By viewing it. This would provide you with a list of applications (different installed browsers) for you to select.
Not a satisfying solution, but in a demo application I alternatively used the following code:
Usually at least one of the two works.
https://github.com/nicolas-raoul/OxygenGuide-Android/blob/master/src/org/github/OxygenGuide/MainActivity.java#L69