Android Question Activity Background die when open from icon desktop sometimes

scsjc

Well-Known Member
Licensed User
Longtime User
When I send the application to the background, if I call it from the notification icon it always loads well.

But if app is background, and I go to the desktop icon, and charge from there, sometimes the activity killed and reloads the app. I think it's for to free up memory space.

Can set the activity in the background? Or always controlled by the system to free memory?

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Or always controlled by the system to free memory?
Android decides when to free memory.
Expect it that a Activity can be killed in the meantime. This means you need to be aware of that your Activity can be run through activity_create again.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Android decides when to free memory.
Expect it that a Activity can be killed in the meantime. This means you need to be aware of that your Activity can be run through activity_create again.

Thank you very much for your answer, I imagined the same
 
Upvote 0
Top