Android [java] view plain copy print ?
  1. //序列化
  2. intent.toURI();
  3. //反序列 化使用:
  4. Intent.parseUri(uriString, 0);
//序列化intent.toURI();//反序列 化使用:Intent.parseUri(uriString, 0);


序列化

[java] view plain copy print ?
  1. Intent intent = new Intent(ACTION);
  2. intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  3. String intnetUri = intent.toURI(0);
Intent intent = new Intent(ACTION);           intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); String intnetUri = intent.toURI(0);

反序列化

[java] view plain copy print ?
  1. Intent i;
  2. try {
  3. i = Intent.parseUri(uriString, 0);
  4. context.startActivity(i);
  5. } catch (URISyntaxException e) {
  6. e.printStackTrace();
  7. }
Intent i;try {     i = Intent.parseUri(uriString, 0);     context.startActivity(i); } catch (URISyntaxException e) {     e.printStackTrace(); }

其中uriString就是序列化后的Intent

更多相关文章

  1. 在Android(安卓)studio 项目中使用 9patch常见问题解决
  2. ClipboardManager android剪切板使用
  3. android 使用Okhttp封装上传JSON格式数据的工具类
  4. android onSaveInstanceState的使用方法
  5. android 使用Okhttp封装上传JSON格式数据的工具类
  6. Android(安卓)uiautomator dump 命令介绍
  7. Android(安卓)SDK开发 -- TitleBar重构 - 使用策略模式、舍弃代
  8. android lrucache使用
  9. Android(安卓)内存笔记

随机推荐

  1. MySQL InnoDB 锁的相关总结
  2. MySQL 查看链接及杀掉异常链接的方法
  3. MySQL数据库自动补全命令的三种方法
  4. MySQL的DATE_FORMAT函数的使用
  5. M1芯片安装mysql8.0数据库的实现步骤(图
  6. mysql实现自增序列的示例代码
  7. mysql 实现设置多个主键的操作
  8. Mysql 增加主键或者修改主键的sql语句操
  9. MySQL定时任务(EVENT事件)如何配置详解
  10. 从云数据迁移服务看MySQL大表抽取模式的