Is there an easy way to print the contents of a Bundle to Logcat if you can't remember the names of all the keys (even being able to print just the key names would be cool)?
Bundle
Bundle#keySet() should work.
for (String key: bundle.keySet()) { Log.d ("myApplication", key + " is a key in the bundle"); }
And if you want to get the Object, you can use Bundle#get(String key)(which is also in the same documentation I linked at the top of my answer). However, keep in mind using the generic get() call:
Bundle#get(String key)
get()
toString()
instanceof
2.1m questions
2.1m answers
60 comments
57.0k users