Would you try it again after commenting * intent.setFlags(Intent.FLAG_*
*ACTIVITY_NEW_TASK)* ?


On Wednesday, November 7, 2012 1:30:17 AM UTC+11, Bunty syed wrote:
>
>         Hi All,
>         
>         Hope doing well.
>         
>         I have one app with one button.
>
>         On click of button, I am trying to launch second app by passing 
> some bundle.
>         
>         My second app is having two activities. I launched the second app 
> from phone & then navigated to second activity.
>         
>         Then I went to first app & cliked the button to launch the second 
> app by passing some bundle as below .
>         
>             //my code
>            
>             Intent intent = new Intent("android.intent.action.MAIN");
>
>             intent.addCategory("android.intent.category.LAUNCHER");
>
>             intent.setComponent(new ComponentName(com.secondapp, 
> secondapplauncheractivity));
>
>             intent.putExtra("bundlekey", "bundlevalue");
>
>              intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>         
>         
>         Above code resumed the second app but I am not getting any bundle 
> in the intent of the second app.
>
>     I overidden lifecycle methods in the second app to check for this 
> bundle by calling below code --
>
>     //my code
>
>     Intent i =  this.getIntent();
>
>      if(i != null ){
>                
>         Bundle b = i.getExtras();
>
>         if(b!= null && b.containsKey("bundlekey")){
>
>                     Log.i("TAG", "found bundle===================");
>                    
>          }
>
>       }
>
> I tested the above scenario in google nexus 4.1.2 android version
>         
>         
>                   
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to