Skip to content

Instantly share code, notes, and snippets.

@FireZenk
Created March 29, 2019 09:48
Show Gist options
  • Save FireZenk/b08dadcdd362ad2bc7a1865346f1895c to your computer and use it in GitHub Desktop.
Save FireZenk/b08dadcdd362ad2bc7a1865346f1895c to your computer and use it in GitHub Desktop.
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