Crashlytics gave me the following crash report. I have two Android devices that I test the application with and I am not able to replicate the crash. The app does not crash on my test devices but in Crashlytics I get a lot of these crashes and on devices that are not old. Please assist.
Brand: Samsung
Model: Samsung Galaxy s10+
Orientation: Vertical
RAM available: 7,680 MB (7,459 MB)
Android Version: Android 9 (SDK 28)
Android 10 (SDK 29)
Android 11 (SDK 30)
java.lang.IllegalStateException: at com.google.android.gms.common.internal.Preconditions.checkState(com.google.android.gms: play-services-basement@@17.5.0:29)
at com.google.android.gms.maps.model.LatLngBounds$Builder.build (Unknown Source:21)
at uk.co.martinpearman.b4a.com.google.android.gms.maps.model.LatLngBoundsBuilder.Build (LatLngBoundsBuilder.java:13)
at org.thebus.hea.routesactivity$ResumableSub_GetTripShape.resume (routesactivity.java:1205)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent (BA.java:267)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:207)
at anywheresoftware.b4a.keywords.Common$11.run (Common.java:1178)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8506)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Brand: Samsung
Model: Samsung Galaxy s10+
Orientation: Vertical
RAM available: 7,680 MB (7,459 MB)
Android Version: Android 9 (SDK 28)
Android 10 (SDK 29)
Android 11 (SDK 30)
B4X:
Sub GetTripShape
Dim urlstring As String = "https://my.api.here"
urlstring = urlstring & "/?key=" & Main.API_KEY_OTS
urlstring = urlstring & "&shape_id=" & shapeID
'Log(urlstring)
Dim job As HttpJob
job.Initialize("",Me)
job.Download(urlstring)
Dim line As Polyline
Dim pointlist As List
Dim point As LatLng
line = gmap.AddPolyline
pointlist.Initialize
Wait For (job) JobDone(job As HttpJob)
If job.Success Then
Log("good media retrieve - routes")
jobdata = job.GetString
'Log(jobdata)
Dim parser As JSONParser
parser.Initialize(jobdata)
Dim rootvar As Map = parser.NextObject
Dim data As List = rootvar.Get("DataRows")
For Each coldata As Map In data
point.Initialize(coldata.Get("shape_pt_lat"),coldata.Get("shape_pt_lon"))
pointlist.Add(point)
TripBoundsBuilder.Include(point)
Next
End If
line.Points = pointlist
Dim tripbounds As LatLngBounds = TripBoundsBuilder.Build
gmapx.AnimateToBounds(gmap, tripbounds, 40)
job.Release
line.Color = Colors.Blue
CallSubDelayed(Me, "GetTripShape_Complete")
End Sub