Created
March 29, 2019 09:48
-
-
Save FireZenk/b08dadcdd362ad2bc7a1865346f1895c to your computer and use it in GitHub Desktop.
Dumps the Android Intent content on Timber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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