Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public class LogUtil {
  2.  
  3. private static final String TAG = "IntentDump";
  4.  
  5. public static void dumpIntent(Intent i){
  6. Bundle bundle = i.getExtras();
  7. if (bundle != null) {
  8. Set<String> keys = bundle.keySet();
  9.  
  10. StringBuilder stringBuilder = new StringBuilder();
  11. stringBuilder.append("IntentDump \n\r");
  12. stringBuilder.append("-------------------------------------------------------------\n\r");
  13.  
  14. for (String key : keys) {
  15. stringBuilder.append(key).append("=").append(bundle.get(key)).append("\n\r");
  16. }
  17.  
  18. stringBuilder.append("-------------------------------------------------------------\n\r");
  19. Log.i(TAG, stringBuilder.toString());
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement