Android: 打印Bundle内容

有的时候在接收一个Intent的数据的时候,不知道key是什么。希望能打印出其key和content。

下面的方法可以实现这个功能:

Bundle bundle = intent.getExtras();        for (String key: bundle.keySet())        {          Log.i("Bundle Content", "Key=" + key + ", content=" +bundle.getString(key));        }

更多相关文章

  1. Android(安卓)activity 参数传递
  2. Buttons in button bars should be borderless; use style="?and
  3. Android使用Application总结
  4. 关于打印日志的使用
  5. android canvas drawText \r\n 换行
  6. Android单选框(RadioButton)
  7. Android上监听收到的SMS
  8. Android实现文件上传功能(接收端用strust2)
  9. Android(安卓)反汇编Smali语言中插入log打印

随机推荐

  1. android init进程解析init.rc过程
  2. Android学习笔记_34_自定义窗口标题
  3. Android之View和ViewGroup事件分发
  4. android topic:Resource Types
  5. Android(安卓)7.0软键盘隐藏问题
  6. 布局动画 属性初始 android:animateLayou
  7. Android 根据 Url 跳转应用
  8. Android 3.0 r1 API中文文档(108) ―― E
  9. 更新Android SDK Manager Mac下修改hosts
  10. Android反编译工具:Apktool,支持Linux 、Wi