Abid Khan Abid Khan - 1 year ago 107
Android Question

Android clear activity from memory

In my app I have a SIP calling feature.
When the app is not opened and it is cleared from the system memory and it receives incoming call it opens the call activity from a SIP service.
When the call is disconnected, I finish the activity.

But the issue is, the activity is still in the memory (when home button is pressed).
I want that activity to not be in the memory.
Like whats app call behavior that don't keep activity in the memory when the app was killed
i.e., not in the memory.

From SIP service I call it like this.

Intent intentIncomingCall = new Intent(getApplicationContext(), CallActivity.class);
intentIncomingCall.putExtra("DisplayName", callerDisplayName);

and on call disconnect, I just simple stop the service and call
on activity.

I have tried adding flags and exit(), things but nothing works.

Answer Source

Try adding above properties to activity in manifest

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