William Hunter Active Member Licensed User Longtime User Jan 23, 2016 #1 I would like to know how to launch a specific browser (not the default) targeting a specific link (URL). I have seen the two examples below, but both will launch the default browser. I am looking for code snippets that would let me launch both Chrome and Firefox in the way I have described. Code: Copy Private i As Intent i.Initialize(i.ACTION_VIEW,"https://www.example.com") StartActivity(i) Code: Copy Dim p As PhoneIntents StartActivity(p.OpenBrowser("https://www.example.com") Erel's code sample below seems to offer a solution, but I don't know how to complete the required entries. Can anyone help me with this? Any help greatly appreciated. Code: Copy Dim in As Intent = p.OpenBrowser(...) in.SetComponent(...) StartActivity(in) Best regards
I would like to know how to launch a specific browser (not the default) targeting a specific link (URL). I have seen the two examples below, but both will launch the default browser. I am looking for code snippets that would let me launch both Chrome and Firefox in the way I have described. Code: Copy Private i As Intent i.Initialize(i.ACTION_VIEW,"https://www.example.com") StartActivity(i) Code: Copy Dim p As PhoneIntents StartActivity(p.OpenBrowser("https://www.example.com") Erel's code sample below seems to offer a solution, but I don't know how to complete the required entries. Can anyone help me with this? Any help greatly appreciated. Code: Copy Dim in As Intent = p.OpenBrowser(...) in.SetComponent(...) StartActivity(in) Best regards
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2016 #2 Use PackageManager.QueryIntentActivities to see the intents required to start all the installed browsers. Note that it is possible that a different intent will be required based on the browser version. Upvote 0
Use PackageManager.QueryIntentActivities to see the intents required to start all the installed browsers. Note that it is possible that a different intent will be required based on the browser version.