Android Question Why i can't Access to another app using links?

bulana2004

Member
WhatsApp Image 2025-01-14 at 15.50.06_dc38f4af.jpg

WebView App code:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private WebView1 As WebView
    Private WebViewExtra As WebViewExtras
    Private Chrome As DefaultWebChromeClient
    Private LocationPermisison As Boolean
End Sub


Public Sub Initialize
    '    B4XPages.GetManager.LogEvents = True
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    WebView1.Height = Root.Height
    WebView1.Width = Root.Width
    Chrome.Initialize("chrome")
    WebViewExtra.Initialize(WebView1)
    WebViewExtra.SetWebChromeClient(Chrome)
    WebView1.LoadUrl("https://akmeemanaps.lk/APP")
    Dim rp As RuntimePermissions
    rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
    Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
    If rp.Check(rp.PERMISSION_ACCESS_FINE_LOCATION) Or rp.Check(rp.PERMISSION_ACCESS_COARSE_LOCATION) Then
        LocationPermisison = True
    End If
End Sub

Private Sub Chrome_GeoLocationPermissionsRequest As Int
    Log("Chrome_GeoLocationPermissionsRequest")
    Return IIf(LocationPermisison, Chrome.GEOLOCATION_PERMISSION_ALLOW_AND_REMEMBER, Chrome.GEOLOCATION_PERMISSION_DISALLOW_AND_REMEMBER)
End Sub

Private Sub B4XPage_CloseRequest As ResumableSub
    WebView1.Back
    Return False
End Sub
 

drgottjr

Expert
Licensed User
Longtime User
i don't know what the link shown has to do with the error message whose image was posted by op,
but maps.app.go.gl is a special lite version of google maps designed to run on
android go devices (although it does work on regular devices). the google
maps go app is required if you're going to launch it with an intent.

in any case, a webview needs a recognized url scheme, eg "http" or "https".
running an intent is something different.
 
Upvote 0

bulana2004

Member
i don't know what the link shown has to do with the error message whose image was posted by op,
but maps.app.go.gl is a special lite version of google maps designed to run on
android go devices (although it does work on regular devices). the google
maps go app is required if you're going to launch it with an intent.

in any case, a webview needs a recognized url scheme, eg "http" or "https".
running an intent is something different.
@drgottjr @DonManfred @teddybear

Please look at this and help me if possible.
(Google Drive Link)
 
Upvote 0
Top