What happens at the system level when we press hardware button "Recent apps", and at the "recent apps" window delete the app? At the user level, the application is removed from the list, if the application has been launched the service, it loses the application process and restarts.
I need to repeat this user action (removal of the program from the list of recent applications) by software from the itself application, with all the associated system procedures. Or delete from the list by another application.
Hiding the application through the Android-manifest (like android:excludeFromRecents) is not suitable.
Who can help in this matter, please advise the solution.