Question

I am facing very complicated issue with Activity Group. In my application I have used ActivityGroup. With other activity navigation I used:

Intent activityIntent = new Intent(v.getContext(), Reschedule.class);
    activityIntent.putExtra("dialog_selcted_Appointment_date_time", selected_date +" "+ selected_time);
    replaceContentView("activity3", activityIntent);

private void replaceContentView(String id, Intent newIntent) {
    View view = this.getLocalActivityManager().startActivity(id,newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) .getDecorView(); this.setContentView(view);}

My issue is, once I navigate on the other screen this this intent now if one more time I will make the same navigation without changing the activity then it gives an error of:

02-23 18:16:15.200: E/ACRA(2433): 
Caused by: android.view.WindowManager$BadTokenException: Unable to add window --
 token android.app.LocalActivityManager$LocalActivityRecord@44f04458 is not valid; is your activity running?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top