Here's a bit of code you can use to get the list of extras you've passed to the Activity.
public String debugIntent()
{
Intent intent = getIntent();
String result = "";
Bundle extras = intent.getExtras();
if (extras == null)
{
return "no extras";
}
else
{
result += "key count: " + extras.keySet().size();
for (String key : extras.keySet())
{
result += "\n" + key;
}
}
return result;
}
This will give you a String that will list each of the extras you have supplied to the current Activity.
No comments:
Post a Comment