android - Opening url in the last open tab in chrome -



android - Opening url in the last open tab in chrome -

i getting issue while opening url in default browser (chrome)

my requirement opening url in lastly open tab in chrome browser 4.4.4 (chrome default browser). not in new tab.

below code opening url in new tab:

intent mbrowserintent = new intent(intent.action_view); mbrowserintent.addflags(intent.flag_activity_clear_task); mbrowserintent.putextra(browser.extra_application_id,mcontext.getpackagename()); mbrowserintent.addcategory(intent.category_browsable); mbrowserintent.addflags(intent.flag_activity_new_task); mbrowserintent.setdata(uri.parse(murl)); mcontext.startactivity(mbrowserintent);

please help in resolving issue.

thanks,

this works me, note should not utilize getpackagename():

intent intent = new intent(intent.action_view, uri.parse("http://yahoo.com")); intent.putextra(browser.extra_application_id, "com.android.browser"); startactivty(intent);

edit: tested on 4.2.2, , works.

android google-chrome browser

Comments

Popular posts from this blog

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -