How To Avoid Loading Local Page In New Tab On Default Android Browser
I want to do the opposite of this: Android Browser: open several URLs, each on new window/tab (programmatically) In there, the answer was to use b.putBoolean('new_window', true); b
Solution 1:
Okay I found the fix. Basically, phones running 2.3 and lower use com.android.browser
, with activity name com.android.browser.BrowserActivity
. I believe in 3.0, ApplicationIDs were introduced.
Tablets still use the same Browser package name, but has an ApplicationID of com.android.browser
, while ICS 4.0.2+ uses com.google.android.browser as the package name, and com.google.android.browser
as the appId (same Activity name is used). So I just had to add that into my BrowserData.
After this, one must use the EXTRA_APPLICATION_ID
flag on their browser intent to avoid the automatic opening of a new tab. More on that here: http://developer.android.com/reference/android/provider/Browser.html
Post a Comment for "How To Avoid Loading Local Page In New Tab On Default Android Browser"