I have activity that I use in animated modes, so I need to do things like this:
Intent i = new Intent(MainListActivity.this,MainActivity.class); extras.putInt("id", c.getId()); extras.putInt("mode", AREA_MODE); i.putExtra("extras", extras); startActivity(i);
and in onCreate :
Intent i = this.getIntent(); extras = i.getBundleExtra("extras"); if(extras!=null){ id = extras.getInt("id", -1); mode = extras.getInt("mode", COUNTRY_MODE); }
But preemptive actions are always zero. Am I missing something? Is there any way to do this?
EDIT: For some reason, the getIntent() method returns the previous Intent , which in my case has no additional (main intent). I am trying to understand why.
source share