Created
February 25, 2014 13:31
-
-
Save artem-zinnatullin/9208755 to your computer and use it in GitHub Desktop.
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
public static String getIntentExtrasAsString(Intent intent) { | |
if (intent == null || intent.getExtras() == null || intent.getExtras().isEmpty()) return "no extras or null intent"; | |
StringBuilder stringBuilder = new StringBuilder(); | |
for (String key : intent.getExtras().keySet()) { | |
stringBuilder.append("(" + key + ", " + intent.getExtras().get(key) + ")") | |
.append(", "); | |
} | |
return stringBuilder.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment