Ajit Dubey Ajit Dubey - 2 years ago 107
Android Question

Application should not display in recent app list after finish the activity if app was not displaying recent app list previously

Step 1- Application is not exist in recent app list (App has been removed from recent app list).

Step 2- As soon as I got notification open IncomingCall activity, User accept the call.

Step 3- User click on disconnect button finish the IncomingCall activity.

Problem- Application showing in recent app list even app was not in recent app list previously.

Manifest entry

android:screenOrientation="portrait" >

In the activity using

public void onClick(View v) {
switch (v.getId()) {
case R.id.onCallDisconnectButton:

And also I have tried below link but it will work when app already exist in background

Remove app from recent apps programmatically

Is there any other way to show incoming call view So that it will not persist in history.

you can take example of any VoIP calls app-

Remove app from recent app list after that incoming call came, user disconnect the call activity(IncomingCallActivity) would not be exist in recent app list.
But in My case activity persist in recent app list after disconnecting the call.


Answer Source

Thanks God, I got answer after wondering a week. Add singleTask attribute along with exclude from recent. It was a bug in 5.0 now has been resolved in 5.1

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download