android - Listing all extras of an Intent -
for debugging reasons want list extras (and values) of intent. now, getting keys isn't problem
set<string> keys = intent.getextras().keyset();
but getting values of keys 1 me, because values strings, boolean... how values in loop (looping through keys) , write values logfile? hint!
here's used information on undocumented (3rd-party) intent:
bundle bundle = data.getextras(); if (bundle != null) { (string key : bundle.keyset()) { object value = bundle.get(key); log.d(tag, string.format("%s %s (%s)", key, value.tostring(), value.getclass().getname())); } }
(make sure check if bundle
null before loop)
Comments
Post a Comment