Created
January 22, 2015 20:34
-
-
Save adamcmwilson/24a5c0bef9c20193048d to your computer and use it in GitHub Desktop.
Bundle Key/Value Debug Logging
This file contains hidden or 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.os.Bundle; | |
| import com.nuvyyo.android.slipstream.exovideoplayer.BuildConfig; | |
| public class BundleUtils { | |
| public static void logBundleKeys(Bundle args) { | |
| try { | |
| if (BuildConfig.DEBUG) | |
| for (String key : args.keySet()) { | |
| final Object value = args.get(key); | |
| bundleItem(key, | |
| value.toString(), | |
| value.getClass().getSimpleName()); | |
| } | |
| } catch (Exception e) { | |
| e.printStackTrace(); | |
| } | |
| } | |
| private static void bundleItem(final String key, | |
| final String value, | |
| final String type) { | |
| // TODO: log here... | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment