E Ederson Kerber Member Licensed User Apr 9, 2019 #1 I have a webview displaying an html page (locally stored). The html page has an image that contains an external link to my app, ex: https://www.google.com/ I need to click on the image that contains the link (https://www.google.com/), it will open in the default android browser and not in the webview inside my app. Thanks!
I have a webview displaying an html page (locally stored). The html page has an image that contains an external link to my app, ex: https://www.google.com/ I need to click on the image that contains the link (https://www.google.com/), it will open in the default android browser and not in the webview inside my app. Thanks!
DonManfred Expert Licensed User Longtime User Apr 10, 2019 #2 You should use webview and use the overrideurl event. Last edited: Apr 10, 2019 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Apr 10, 2019 #3 The OverrideUrl is part of WebView. No need to use WebViewExtras for this. Use PhoneIntents from the Phone library to open the browser. Upvote 0
The OverrideUrl is part of WebView. No need to use WebViewExtras for this. Use PhoneIntents from the Phone library to open the browser.
DonManfred Expert Licensed User Longtime User Apr 10, 2019 #4 Erel said: No need to use WebViewExtras for this. Click to expand... sorry. removed... Upvote 0
E Ederson Kerber Member Licensed User Apr 10, 2019 #5 Hi Thank you for the tips. But the proposed solution does not meet my need. PhoneIntents opens the link in the browser when the link is not inserted into the html file - I already use it for other projects: Code: Copy StartActivity (pi.OpenBrowser ("https://www.google.com")) . However, what I need is: When I click the button, the app will open the html file in a webview. In the open html in webview has a link that should be open in the default browser and not inside the webview itself. Attachment 3 project images: 1 - Start screen with the button to click and open the html file; 2 - Webview with open html; 3 - Link(www.google.com) that is in the html open in the webview, but should be opened in the default browser. P.S: I tried attaching a sample project example.zip (634KB), however, I received the following error: "The following error occurred: The uploaded file is too large". If you can send it any other way, please let me know. Thanks! Attachments 1.jpg 39 KB · Views: 765 2.jpg 141.8 KB · Views: 710 3.jpg 82.1 KB · Views: 833 Upvote 0
Hi Thank you for the tips. But the proposed solution does not meet my need. PhoneIntents opens the link in the browser when the link is not inserted into the html file - I already use it for other projects: Code: Copy StartActivity (pi.OpenBrowser ("https://www.google.com")) . However, what I need is: When I click the button, the app will open the html file in a webview. In the open html in webview has a link that should be open in the default browser and not inside the webview itself. Attachment 3 project images: 1 - Start screen with the button to click and open the html file; 2 - Webview with open html; 3 - Link(www.google.com) that is in the html open in the webview, but should be opened in the default browser. P.S: I tried attaching a sample project example.zip (634KB), however, I received the following error: "The following error occurred: The uploaded file is too large". If you can send it any other way, please let me know. Thanks!
DonManfred Expert Licensed User Longtime User Apr 10, 2019 #6 Use the override url event of the webview to catch the click. Code: Copy Sub WebView1_OverrideUrl (Url As String) As Boolean StartActivity (pi.OpenBrowser (url)) Return True End Sub Upvote 0
Use the override url event of the webview to catch the click. Code: Copy Sub WebView1_OverrideUrl (Url As String) As Boolean StartActivity (pi.OpenBrowser (url)) Return True End Sub