O
O
Oleg Gamega2015-04-17 12:05:29
Android
Oleg Gamega, 2015-04-17 12:05:29

How to close the application and remove it from memory?

Good day.
How to programmatically close the application and remove it from memory?
There is something like a messenger for lovers, without knowing about its presence, it cannot be launched. It also needs to be quickly hidden.
The point is that if you minimize the application, or when making a call ... it should not be displayed in recently opened applications ─finish() is not suitable for this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
anyd3v, 2015-04-17
@anyd3v

Try

android:autoRemoveFromRecents
Whether or not tasks launched by activities with this attribute remains in the overview screen until the last activity in the task is completed. If true, the task is automatically removed from the overview screen. This overrides the caller's use of FLAG_ACTIVITY_RETAIN_IN_RECENTS. It must be a boolean value, either "true" or "false".

and
System.exit(0);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question