Android Question Force open url without Url Scheme

Pooya1

Active Member
Licensed User
Hi
I used Url Scheme in my app and it is working well.
But there is problem,
I try open my website when user click on label
But when use below code for open link,my app open because opened link is scheme in manifest
How do i force android to open url without my app?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Pooya1

Active Member
Licensed User
In that case your app should open an activity and use a webview to navigate to this url. I guesss.
Otherwise it seems you can not open that website from your app.
Can i use default android's browser package name in intent and open link?
Surly android have default browser that user can open directly with it?
 
Upvote 0

Pooya1

Active Member
Licensed User
B4X:
Dim in As Intent = ph.OpenBrowser(...)
in.SetComponent("com.android.browser/com.android.browser.BrowserActivity")
StartActivity(in)

There is an assumption here about the default browser package and activity names. It might not always be correct.
I showed url in WebView in app
Thanks
 
Upvote 0

Pooya1

Active Member
Licensed User
I used below code and working i think :confused:
B4X:
Dim ph As PhoneIntents
Dim i As Intent
i = ph.OpenBrowser(Url)
i.Flags =  268435456
StartActivity(i)
 
Upvote 0
Top