[java] view
plaincopyprint?
- //序列化
- intent.toURI();
- //反序列 化使用:
- Intent.parseUri(uriString, 0);
序列化
[java] view
plaincopyprint?
- Intent intent = new Intent(ACTION);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- String intnetUri = intent.toURI(0);
反序列化
[java] view
plaincopyprint?
- Intent i;
- try {
- i = Intent.parseUri(uriString, 0);
- context.startActivity(i);
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
其中uriString就是序列化后的Intent
时间: 2024-10-13 16:21:27