The intent and CallSubDelayed are doing the same thing. You can do the same thing with either one.
1. If using intents only, Pass the "name_of_sub" in the intent extras and callsub from within the started activity.
2. If using CallSubDelayed, Use CallSubDelayed to pass all the intent parameters with the sub.
Yes CallSubDelayed can do some simular things as intent, but there are important differences.
Callsubdelayed calls an extra sub after activity resume, but does this only once. If activity is paused and later resumed, this extra sub is not called again. Furthermore, in activity_create and activity_resume is it not known if the extra sub is called later on or not.
With intent, this is different. The intent extra remains available and is already available in acitivity_create and in activity_resume. If I use an extra to call a sub, this extra sub is called again if you for example rotate the device, because the intent is still there.
Another difference is the use of flags.
With intent you can use FLAG_ACTIVITY_CLEAR_TOP to finish all activities if user goes back to a home activity. If I use CallSubDelayed, the activity stack is not cleared.
And another difference is that callsubdelayed calls the sub even if activity is in foreground already. With the use of an intent this is not the case. Activity is not started again, only the intent is changed. The extra sub would not be called in this situation, because activity_resume and activity_create is not called.
And last but not least, from notifications, intent is the only way.
So normally I use intents instead of callsubdelayed. But in a particualer case I callsubdelayed would suit me more. But the side effect: clearing the starting intent was not good. Therefore I tried to combine them: callsubdelayed(intent). I would have been great.
I figured a way though. With a global parameter, and use of callsub if the activity is already running, and intent if it's not running.
Thanks all for your help.