I have a crash report in google play console.
My targetsdkversion is 26 and B4A version is 8.5.
I hope it was from a service. Following are some of the codes from that service
Please note that I also implemented the crashlytics and it work when I tested in the AVD. But I didn't receive any crash report in firebase console about this error.
Please help me to overcome this crash. Thank you.
My targetsdkversion is 26 and B4A version is 8.5.
B4X:
Samsung Galaxy On7 Prime (on7xreflte), Android 8.0
Report 1 of 1
java.lang.RuntimeException:
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3399)
at android.app.ActivityThread.-wrap18 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1780)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6942)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1538)
at android.app.ContextImpl.startService (ContextImpl.java:1484)
at android.content.ContextWrapper.startService (ContextWrapper.java:663)
at android.content.ContextWrapper.startService (ContextWrapper.java:663)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.startServiceFromReceiver (ServiceHelper.java:125)
at serandib.jobs.noti$noti_BR.onReceive (noti.java:17)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3392)
I hope it was from a service. Following are some of the codes from that service
B4X:
Sub Service_Create
Service.AutomaticForegroundMode= Service.AUTOMATIC_FOREGROUND_WHEN_NEEDED
End Sub
Sub Service_Start (StartingIntent As Intent)
StartServiceAt(Me, DateTime.Now + 15 * DateTime.TicksPerMinute, False)
If StartingIntent.HasExtra("android.intent.extra.ALARM_COUNT") Then
Dim Job As HttpJob
Job.Initialize("lst",Me)
Job.Download ("http://xxxx......")
End If
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success Then
'...... raise the notification using NB6
End If
Service.StopAutomaticForeground
End sub
Please note that I also implemented the crashlytics and it work when I tested in the AVD. But I didn't receive any crash report in firebase console about this error.
Please help me to overcome this crash. Thank you.