I am putting a service module to foregound state with code below in order to keep activity from beeing killed .
It seems the OS android kill anyway the main activity , is this ok ? Is this happening due to low memory of device ?
I tried this solution to avoid activity recreation which lasts some time and user must access more fast the app functions.
Do I have to add something else ?
Is there any other way to make the activity availlable without any restictions ?
It seems the OS android kill anyway the main activity , is this ok ? Is this happening due to low memory of device ?
I tried this solution to avoid activity recreation which lasts some time and user must access more fast the app functions.
Do I have to add something else ?
Is there any other way to make the activity availlable without any restictions ?
B4X:
'statement from service create
notif.Initialize
notif.Icon="icon"
'statement from sub
notif.sound=False
notif.Vibrate=False
Service.StartForeground(1,notif) ' start foregound