java - Chrome for Android opens new tab but remains in background when lauched from app -


i have app launches chrome. on below 6.0 works fine, 6.0+ opens new tab website want on background, keeping app on front , not switching chrome. there code force android switch chrome on more recent fw?

  string url = "googlechrome://navigate?url=www.staging.bebrightbook.com/website/?app_login="+finalstring+"&book_red="+book;       intent = new intent(intent.action_view, uri.parse(url));     i.addflags(intent.flag_activity_new_task);     i.setpackage("com.android.chrome");     try {         startactivity(i);     } catch (activitynotfoundexception e) {         i.setpackage(null);         startactivity(i);     } 


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -