Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dumps the Android Intent content on Timber
import android.content.Intent
import timber.log.Timber
fun dumpIntent(intent: Intent) {
val bundle = intent.extras
if (bundle != null) {
val keys = bundle.keySet()
val it = keys.iterator()
Timber.e("------->>> Dumping Intent start")
while (it.hasNext()) {
val key = it.next()
Timber.e("[" + key + " = " + bundle!!.get(key) + "]")
}
Timber.e("------->>> Dumping Intent end")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.