First of all I have read some quizes and read the guide about life cycle of activities.
Perhaps i did not read carefully enough, but the bug i am experiencing is not covered by one of the quizes or explanations.
Bug description:
---
App is started as usual. Smartphone is idle for several hours (for example over night). App is resumed but the layout shown is empty!
---
Remarks:
I only use variables defined as service global variables. (except of the buttons and EditText, they are declared in Sub Globals of the activity)
The following code solves the problem but there is always a notification displayed:
Sub Service_Create
nNotify.Initialize
nNotify.Icon = "auto"
nNotify.Light = True
nNotify.SetInfo("Termi Service für Sicherungen", "Klicke um Termi zu öffnen", Main)
nNotify.Sound=False
nNotify.Vibrate=False
Service.StartForeground(1,nNotify)
End Sub
I do not want a notification to be displayed however.
Without that idle time the problem does not occur. For example i kill the process manually but when resuming app activity is loaded correctly.
I also tested with developer options 'No Background Services' and switched between apps. This was also causing no problems.
It seems there is a problem caused with the idle time of several hours.
Any Ideas?