Android Question Intent GetExtras as a Map

b4auser1

Well-Known Member
Licensed User
Is there a way to get extra data from Intent as a Map ? It let to build more universal solutions without hardcoding getting each extra data Item with GetExtra("...").
 

b4auser1

Well-Known Member
Licensed User
I need Map for Extras not for exploration, but for regular using in order to avoid hardcoding Extra Item names.
Is there a way to do it with JavaObject ? If yes, I would appreciate the appropriate code snippet/
 

b4auser1

Well-Known Member
Licensed User
Is it possible to implement B4A ode using JavaObject see. below Java code ?

B4X:
//fetching extra data passed with intents in a Bundle type variable
extras = getIntent().getExtras();
if(extras == null)
{        newString= null;
}
else
{            /* fetching the string passed with intent using ‘extras’*/
newString= extras.getString("STRING_I_NEED");
}
}
 
Top