Android Question [Action Recommended] Update to latest renderer for the Maps SDK for Android

Filippo

Expert
Licensed User
Longtime User
Hi,

I received this e-mail from Google yesterday.
Question, will the GoogleMaps be updated soon?

 

DonManfred

Expert
Licensed User
Longtime User
I started doing a new wrapper for googlemaps some months ago but were not able to test it.

The new one is using this initialization
B4X:
com.google.android.gms.maps.MapsInitializer.initialize(ba.context, Renderer.LATEST, this);
which refers to the newest Renderer to use.

It should work work with the above requirements.

Want to test it?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Open B4A Sdk Manager and update com.google.android.gms:play-services-maps to version 18.2.0. Don't update anything else.
2. That's it.
3. If for some reason you want to keep on using the legacy renderer then call this sub:
B4X:
'call this before loading the layout, if you want to use the legacy maps renderer.
Private Sub InitializeWithLegacyRenderer
    Dim ctxt As JavaObject
    ctxt.InitializeContext
    Dim MapsInitializer As JavaObject
    MapsInitializer.InitializeStatic("com.google.android.gms.maps.MapsInitializer")
    Dim Renderer As JavaObject
    Renderer.InitializeStatic("com.google.android.gms.maps.MapsInitializer.Renderer")
    Dim SdkInitializedEvent As OutputStream = Renderer.CreateEventFromUI("com.google.android.gms.maps.OnMapsSdkInitializedCallback", "SdkInitializedEvent", Null)
    MapsInitializer.RunMethod("initialize", Array(ctxt, Renderer.GetField("LEGACY"), SdkInitializedEvent))
End Sub

Private Sub SdkInitializedEvent_Event (MethodName As String, Args() As Object) As Object
    Log(MethodName)
    Log(Args(0))
    Return Null
End Sub
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
What about B4i?
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
1. Open B4A Sdk Manager and update com.google.android.gms:play-services-maps to version 18.2.0. Don't update anything else.
since SDK manager is seldom used, it gave me a "sdkmananager.bat not found" error.
will the resources zip from the B4X download page will be updated as well, so we won't need to use SDK manager?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
will the resources zip from the B4X download page will be updated as well, so we won't need to use SDK manager?
Yes but it might take some time.

It should be simple to solve the "sdkmananager.bat not found" error. You just need to point to:
B4X:
<android sdk>\cmdline-tools\bin\sdkmanager.bat
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…