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
Post a Comment