Android Question Prevent my app to be closed

Addo

Well-Known Member
Licensed User
Longtime User
In newer Android versions i see an apps like YouTube and Google Chrome does not closed if user opened recent apps and clicked, close all apps.

Also in google Chrome app i notice that there is a lock icon showing in the top right corner when i open recent apps.

How do i achieve the same with b4a to prevent my app to be closed if a user choose to close all apps?
 

Addo

Well-Known Member
Licensed User
Longtime User
I think that is true only if it was the last app displayed, and that it is Android doing it and not the app. I think any app behaves the same.

As you see in the attached image there is a lock icon in the top right corner.. Which is activated by default during installation.

This lock prevents the app from closing with close all apps button.

You can manually activate this lock by holding the app from recent and drag down..
Then the app willl be locked and will not effected by closing all apps.

I am looking for how to activate this lock with b4a without need to do it manually from the user. As Chrome and YouTube does
 
Last edited:
Upvote 0
Top