How to hide Android application from task switcher

I have an application that I would like to hide from the list of running processes (the "recent" selector on Android 4.x). How can i do this? I would appreciate if someone could point me to the resources or the general architecture of the question?

I am new to Android, so it took me a while to find out that the selector window is called "last". (also with difficulties navigating the source code in grepcode and distinguishing between the processes / actions produced by the manufacturers and those included in the main release of android).

I vaguely understand that the individual running elements are called tasks, but are not sure how the tasks and apk / activity / services are related. There should be a piece of code that selects whether a given process can be switched and presented in the task manager.

I would expect that rooting, or some opportunity provided by the manufacturer, would be required.

+4
source share
1 answer

Just add this to your manifest:

<activity android:name="qualified.name.of.Activity" android:excludeFromRecents="true" ...> 

More on this here: http://developer.android.com/guide/topics/manifest/activity-element.html

+6
source

Source: https://habr.com/ru/post/1499675/


All Articles