Hi, I want to use my web app in a webview. The problem is that the web app is written in React and JS and uses GPS, mic, and webcam. In browsers like Chrome, everything works, but with Webview, I can't enable GPS, mic, etc. because Webview doesn't allow it and the request is denied. Does anyone know how to do this?
b4a:
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
WebView1.JavaScriptEnabled = True
Dim wve As WebViewExtras
wve.Initialize(WebView1)
Dim jo As JavaObject = WebView1
Dim settings As JavaObject = jo.RunMethod("getSettings", Null)
Dim jo As JavaObject = WebView1
Dim settings As JavaObject = jo.RunMethod("getSettings", Null)
Dim wc As JavaObject
wc.InitializeNewInstance("android.webkit.WebChromeClient", Null)
wc = wc.CreateEvent("android.webkit.WebChromeClient", "GeoClient", Null)
jo.RunMethod("setWebChromeClient", Array(wc))
WebView1.LoadUrl("https://facelive.net")
End Sub
Sub Activity_Resume
If rp.Check(rp.PERMISSION_ACCESS_FINE_LOCATION) = False Then
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub