Created
January 26, 2015 17:26
-
-
Save cinek19/350162c9a9d7e18ca92c to your computer and use it in GitHub Desktop.
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
public void onReceive(Context context, Intent intent) { | |
debugIntent(intent, "grokkingandroid"); | |
} | |
private void debugIntent(Intent intent, String tag) { | |
Log.v(tag, "action: " + intent.getAction()); | |
Log.v(tag, "component: " + intent.getComponent()); | |
Bundle extras = intent.getExtras(); | |
if (extras != null) { | |
for (String key: extras.keySet()) { | |
Log.v(tag, "key [" + key + "]: " + | |
extras.get(key)); | |
} | |
} | |
else { | |
Log.v(tag, "no extras"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment