Android Question Can't open whatsapp link in webView

Celso

Member
Licensed User
Longtime User
Hi, after my success in my first code, have a stone on the way.

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("Layout")   
   MyWebViewExtras.addWebChromeClient(WebView1, "AbreGeo")
   WebView1.JavaScriptEnabled = True
   WebView1.LoadUrl("https://www.cl4.com.br/map.php?id=17")
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub

Sub AbreGeo_GeolocationPermissionsRequest As Int
   Dim Response As Int
   Response=Msgbox2("Autorizar usar localização?", "Autorização Necessária:", "Aceitar", "", "Recusar", Null)
   If Response=DialogResponse.POSITIVE Then
       ToastMessageShow("Permitido", True)
       Return MyWebViewExtras.GEOLOCATION_PERMISSION_ALLOW_AND_REMEMBER
   Else
       ToastMessageShow("Rejeitado", True)
       Return MyWebViewExtras.GEOLOCATION_PERMISSION_DISALLOW
   End If
End Sub

But in a browser I can open whatsapp, in webview not, can someone give me a way?

Tks a lot!
 
Top