Googlemap.apk - tested, working.
Please advise.
Thank you.
manifest:-
GPS collection code as below:-
Please advise.
Thank you.
manifest:-
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
SetApplicationAttribute(android:largeHeap,"true")
AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyDIbmbyuijOgRwYNLIGQjukV29Pc_y9iKs"/>
)
GPS collection code as below:-
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("lyCollectGPS")
If MapFragment1.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Please install Google Play Services.", True)
End If
End Sub
Sub MapFragment1_Ready
gmap = MapFragment1.GetMap
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
gmap.GetUiSettings.MyLocationButtonEnabled=True
Dim m1 As Marker = gmap.AddMarker(10, 30, "test")
m1.Snippet = "This is the snippet"
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
If Permission = Starter.rp.PERMISSION_ACCESS_FINE_LOCATION Then
gmap.MyLocationEnabled = Result
End If
End Sub