Termux-app: Remove from recent apps on exit

Created on 9 Nov 2020  路  6Comments  路  Source: termux/termux-app

Feature description

Termux to be removed from the recent apps list when it exits.

Reference implementation

The Android webview does this when you press the close button.

Screenshot_20201109-144629.png

All 6 comments

Any practical reason Termux should do that?

@xeffyr Because when it doesn't, trying to visit the app after tapping Exit causes Termux to immediately close.

Termux should quit itself when the session ends rather than waiting for the user to focus the activity again.

edit: Damn, I can't reproduce this after trying to record a video of it. It happened when I verified it for the comment, but I can't cause it to happen again... revisiting Termux from the recents screen just causes it to start a new session. I still think it should close the app completely when tapping the Exit button.

FYI, recents are not necessarily opened applications.

It kinda is though. When an app completely exits, it is removed from the Recents screen. It looks to me like Termux does not completely exit when the Exit button is tapped. This may be a side effect of a bug.

It kinda is though. When an app completely exits, it is removed from the Recents screen.

If that is the case, I think this depends on the Android rom. On my Pixel 3, the only time applications are removed from recents if I do it manually, or if it's a long time since it was used. An app is never removed from recents when it completely exits. Even if I force stop an app, it remains there.

As for Termux, if I exit Termux, and click on it in recents it opens again with a new session.

It looks to me like Termux does not completely exit when the Exit button is tapped.

It exits completely, yet it is not like force-close. Also, force-close doesn't remove app from recents - never observed such behavior.

This may be a side effect of a bug.

Not bug. Generally I don't see any bug here at all. Closed applications may remain to be cached and that's normal and expected behavior of Android OS. Probably calling System.exit when activity finishes will prevent caching, but this is something that will not be implemented.

Was this page helpful?
0 / 5 - 0 ratings