Android Question How to set actions for special url schemes in webview

John Andres

New Member
Licensed User
Longtime User
Is there a way to set the intent of links that are clicked on in the webview? Specifically, I can open a google maps page and it will show me the map with the path from current location to the destination. However, that page has a navigate button on it that should pull up the turn by turn directions in the google app, but webview doesn't know how to handle the link that starts with "intent://maps.app..."
 
Last edited:

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
You can make a condition in webview override event to handle such that custom url in external intent by calling like this:
B4X:
Dim p As PhoneIntents
        StartActivity(p.OpenBrowser("intent://maps.app..."))
 
Upvote 0

John Andres

New Member
Licensed User
Longtime User
You can make a condition in webview override event to handle such that custom url in external intent by calling like this:
B4X:
Dim p As PhoneIntents
        StartActivity(p.OpenBrowser("intent://maps.app..."))
Thank you HAH! It isn't exactly how I wanted this to work, but I was able to come up with a good solution.
 
Upvote 0
Top