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);
android:allowTaskReparenting="false" android:excludeFromRecents="true" android:launchMode="singleTask" android:permission="android.permission.USE_SIP" android:screenOrientation="portrait" android:taskAffinity=""
Try adding above properties to activity in manifest