Monday, February 13, 2012

How to discover extras from intent in Android?

If you are catching some unknown intent, this is simple way, how to discover whis extras is available.

Bundle extras = getIntent().getExtras();
Set<String> ks = extras.keySet();
Iterator<String> iterator = ks.iterator();
while (iterator.hasNext()) {
    Log.d("KEY", iterator.next());
}

No comments:

Post a Comment