Question: I have couple of activities say A , B, C. Activity A starts B , B starts C and so on. In my app I have put a navigation drawer which allows users to go back to activity A. When user goes back to activity A I have passed some flags which don't actually restart the activity but just resumes it.

```
intent = new Intent(activity, A.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
        | Intent.FLAG_ACTIVITY_SINGLE_TOP);

```

Now I m trying to pass some data using bundles. 

```
    bundle.putInt("selectedTab", FEATURED_COUPONS);
    intent.putExtras(bundle);

```

But in my activity A the bundle is always null.

```
if(bundle != null)
{
    if(bundle.containsKey("selectedTab"))
    {
        int tab = bundle.getInt("selectedTab");
    }
}

```

Answer: 
I think you should do " if(bundle != null)" task in onNewIntent(Intent) method
If you want pass data to an activity already created you must use startActivityForResult and override onActivityResult method in activity A.

Instead, if you create the activity again I recommend to use finish() in the activity, after the startActivity method.