i am trying to create a notifcation when service started i am using b4a version 8 and i have follow the instruction to set info at last call like following
B4X:
Sub Service_Create
'This is the program entry point.
'This is a good place to load resources that are not specific to a single activity.
nNotify.Initialize
nNotify.Icon = "icon"
nNotify.Sound=False
nNotify.Vibrate=False
nNotify.Light=False
nNotify.OnGoingEvent=True
nNotify.SetInfo("back to app", "Test", Main2)
Service.StartForeground(1, nNotify)
End Sub
but this crash on android 5.1 each time service started
thats how i start the service on main2 activity create
i am trying to track the exception on the client side because its not running under the ide to track the log but it gives app stop from working i will try to catch the exception and post it
You can add firebase crashlytics library, let the app crash at the customers device and check the Crashlytics crashreport in the Firebaseconsole later.
i will wait 24 hours until my firebase start capture also i notice on some old phones the icon of notifcation is not visible and have blue circle instead the sie of the icon is 36 its not that big also i have created drawable Resolution to capture the icon based on the phone Resolution
Sounds like a problem with the icon file itself. Remove all the resources you added and add a single one under drawable. Make sure that that icon is small.
Honestly did not find any work around for this issue only I had to detect the running api and not load the notification for the api that got this notification crash problem
Hope experts who stuck with similar issue to help with a better solution if there any solution for it