Problems Passing Integer And Serializable On Bundle
I'm trying to pass a serializable and an Integer or a String but on my child activity I only get the serializable Parent Activity Intent intent = new Intent(Class1.this, Class2.cla
Solution 1:
Try and put the int directly on Intent and not through bundle. Meaning :
intent.putExtra("key", 23);
And get it with :
intent.getIntExtra("key", 23);
Should work
But if you have a reason you wanna use the bundle you can try what Sajmon said in the comment, and bundle.getInt("key")
i read somewhere that it's not the same, i'm not sure why.
Post a Comment for "Problems Passing Integer And Serializable On Bundle"