Eketerina
Member
Hi. How to add Runtime Permission on map?
B4X:
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private WebView1 As WebView
Private webkit As WebkitWebChromeClient
Private webkitstn As WebkitWebViewSettings
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")
webkit.Initialize(Me,"webkit",WebView1,True)
webkitstn.Initialize(WebView1)
webkitstn.GeolocationEnabled = True
WebView1.LoadUrl("https://www.google.ru/maps")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub Button1_Click
xui.MsgboxAsync("Hello world!", "B4X")
End Sub
Private Sub B4XPage_CloseRequest As ResumableSub
If WebView1.IsInitialized Then
If WebView1.Url <> "repl_siteurl" Then
#if B4A
WebView1.Back 'android
#End If
#if B4i
WebView1.GoBack 'iOS
#End If
Return False
End If
End If
B4XPages.ShowPage("AppHome")
Return True
End Sub