Android Question Webview call phonenumber

We would like to use the webview to show our users a webpage with information. On this page it is possible to show a phonenumber but when clicking on it, it says "Page not available"
using the html tag:
B4X:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table id="container">
    <tr>
        <td>
        <p>Phone: <a href="tel:0611222333">0611222333</a></p>
        </td>
    </tr>
</table>
</body>
</html>

Any thougts?
 
The webview will be used for showing some shipmentinformation (address, name, phonenumber, etc.). However different clients = different layout (wishes).
But in the current version of the app the client can make a phonecall from the shipmentinformation.

We we're thinking to use the webview for this. Every client can create a different layout with html which the application downloads from our server.
Then the client is responsible for its own layout (and when none given the system uses our default layout).

Do you have other suggestions?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
B4X:
Sub wv_OverrideUrl (URL As String) As Boolean
    Dim n As String

    If URL.IndexOf("tel:") > -1 Then
        n = URL.Replace("http://", "")
        n = n.Replace(".com/", "")
        n = n.Replace(".com", "")
        n = n.Replace("tel:","")
        n = n.Replace("-","")
    
        If n.Length = 10 Then
            Dim I As Intent
            I.Initialize(I.ACTION_CALL, "tel:" & n)
            StartActivity(I)
        End If
        Return True   
    Else
        wv.LoadUrl(URL)
        Return True
    End If
    
End Sub
 
Upvote 0
Top