Depending on what you want there are a few things you can try
- add to your root activity in the manifest
android:clearTaskOnLaunch="true"
With this flag your app will start from the root activity whenever relaunch from home. - add
smsIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
This will clear the SMS inbox activity and all activities above it in the task stack when relaunch the app from home. - add `smsIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); This will clear the SMS inbox activity when relaunch.