Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("main")
Wait For MapFragment1_Ready
Log("====Map is ready====")
gmap = MapFragment1.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
gmap.MyLocationEnabled = True
If gmap.IsInitialized Then
Do While gmap.MyLocation.IsInitialized = False
Sleep(100)
Loop
Dim cp As CameraPosition
cp.Initialize(gmap.MyLocation.Latitude,gmap.MyLocation.Longitude,15)
gmap.AnimateCamera(cp)
End If
End If
End Sub
Sub Activity_Resume
'//try experiment -----------------
Dim j As HttpJob
j.Initialize("",Me)
j.Download("https://epneeh.com/pvt/maps/ver.php")
Wait For (j) jobdone(j As HttpJob)
If j.Success Then
Dim cloudver As Int = j.GetString
If versi <> cloudver Then
ToastMessageShow("Update your apps",True)
End If
Else
ToastMessageShow("Koneksi error",True)
End If
j.Release
If Starter.gps1.GPSEnabled =False Then
StartActivity(Starter.gps1.LocationSettingsIntent)
Return
End If
End Sub