Hello,
I have a problem with the widget, I followed your tutorial and copied the code to create my widget, but sometimes when I try to open my app with the widget displayed on the phone the application does not start and remains black phone screen.
To allow the application to start I have to flip the widget from the screen empty the phone cache and restart the application, in this way it starts.
If I put the widget on the display the first time the application is restarted, it starts then closing it and reopening it opens the black screen.
The situation improves if I put in the code:
B4X:
Sub Service_Start (StartingIntent As Intent)
If RV.HandleWidgetEvents (StartingIntent) Then Return
Sleep (0)
Service.StopAutomaticForeground
End Sub
lines
B4X:
Sleep (0)
Service.StopAutomaticForeground
the problem occurs more rarely, you can give me some help
Thank you
I have a problem with the widget, I followed your tutorial and copied the code to create my widget, but sometimes when I try to open my app with the widget displayed on the phone the application does not start and remains black phone screen.
To allow the application to start I have to flip the widget from the screen empty the phone cache and restart the application, in this way it starts.
If I put the widget on the display the first time the application is restarted, it starts then closing it and reopening it opens the black screen.
The situation improves if I put in the code:
B4X:
Sub Service_Start (StartingIntent As Intent)
If RV.HandleWidgetEvents (StartingIntent) Then Return
Sleep (0)
Service.StopAutomaticForeground
End Sub
lines
B4X:
Sleep (0)
Service.StopAutomaticForeground
the problem occurs more rarely, you can give me some help
Thank you