Android Question Phone function

hdmiacc

Member
Licensed User
Longtime User
hi

i have a question about webview or other idea.

its possible if i using webview function using html contain phone number and how to code it. if i click on that phone number. it will popup the PhoneCalls function.

hope someone can help me. sorry for my poor english.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
See WebviewExtras example.

Click <a href="javascript:void(0)" onclick="B4A.CallSub('CallNumber', true, '+49000000')">Call +49-000-000</a> to call a Sub in the B4A demo code that will call the Phonedialer with a given phonenumber.

B4X:
Sub CallNumber(phonenumber As String)
    Log($"CallNumber(${phonenumber})"$)
    Dim PC1 As PhoneCalls
  StartActivity(PC1.Call(phonenumber))
End Sub
 

Attachments

  • webviewextrasdemo.zip
    9.8 KB · Views: 150
Upvote 0
Top