I get this error in Crashlytics, mostly with Android 8.1 in devices that I don't know which is the manufacturer (Q8Plus, DroiPad 7F, TECNO POP 3...):
I think is related to the Firebase Push Notification.
I tried several codes without success.
Currently my code (FirebaseMessaging) is:
Can I solved this issue with this devices?
Thanks in advance for any tips.
B4X:
Fatal Exception: android.app.RemoteServiceException
Context.startForegroundService() did not the call Service.startForeground()
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1802)
android.os.Handler.dispatchMessage (Handler.java:106)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:857)
I think is related to the Firebase Push Notification.
I tried several codes without success.
Currently my code (FirebaseMessaging) is:
B4X:
Sub Service_Start (StartingIntent As Intent)
If StartingIntent.IsInitialized Then fm.HandleIntent(StartingIntent)
Sleep(0)
Service.StopAutomaticForeground
End Sub
Sub Simple_NotificationNB6Txt(title As String, body As String)
Dim smiley As Bitmap
smiley = LoadBitmapResize(File.DirAssets, "smiley.png", 24dip, 24dip, False)
Dim n As NB6
n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(smiley)
n.Color(Colors.RGB(35,75,205))
n.BadgeIconType("SMALL").Number(1)
n.BigTextStyle(title, "", body)
Dim p As Phone
If p.SdkVersion = 23 Then
Dim notif As Notification = n.Build(title, body, "fbPush", Main)
notif.Cancel(1)
Sleep(50)
notif.Notify(1)
Else
Try
n.Build(title, body, "fbPush", Main).Notify(1)
Catch
Log(LastException)
ToastMessageShow("Fail in notification!", False)
End Try
End If
End Sub
Thanks in advance for any tips.