在onResume()中调用getIntent()得不到Extra的问题
2015-08-09 17:21
357 查看
之前 想做activity间的传值,注意 不是 startActivityforResult的那种, 在启动了多层activity再次启动activity想进入到singleTask的MainActivity
原来只知道启动的顺序为
I/@@@philn(12410): onRestart
I/@@@philn(12410): onStart
I/@@@philn(12410): onResume
然后在onRestart里面 getIntent还是得不到数据,
有人也问了这问题
http://bbs.csdn.net/topics/370120610
某网友给出了解答方向
回复于: 2012-06-20 16:01:31
这么老的帖子都被搜到了,不知道LZ解决了没,我遇到和这一样的问题,解决方法是添加这个函数就ok了,
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);// must store the new intent unless getIntent() will
// return the old one
}
希望搜到这个帖子的后来者能获得这种解决方法
对我有用[6] 丢个板砖[0] 引用 | 举报 | 管理
然后就知道onNewIntent这东西,,http://www.cnblogs.com/zenfly/archive/2012/02/10/2345196.html 这个讲的就不错
原来只知道启动的顺序为
I/@@@philn(12410): onRestart
I/@@@philn(12410): onStart
I/@@@philn(12410): onResume
然后在onRestart里面 getIntent还是得不到数据,
有人也问了这问题
http://bbs.csdn.net/topics/370120610
某网友给出了解答方向
回复于: 2012-06-20 16:01:31
这么老的帖子都被搜到了,不知道LZ解决了没,我遇到和这一样的问题,解决方法是添加这个函数就ok了,
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);// must store the new intent unless getIntent() will
// return the old one
}
希望搜到这个帖子的后来者能获得这种解决方法
对我有用[6] 丢个板砖[0] 引用 | 举报 | 管理
然后就知道onNewIntent这东西,,http://www.cnblogs.com/zenfly/archive/2012/02/10/2345196.html 这个讲的就不错
相关文章推荐
- Java之旅(3)——EJB(初始)
- 在onResume()中调用getIntent()得不到Extra的问题
- Hibernate性能优化技巧
- Linux - 主机的细部权限规划:ACL 的使用
- uva10791 Minimum Sum LCM(唯一分解定理)
- Linux - 主机的细部权限规划:ACL 的使用
- java.lang包下Number的简介
- [2015hdu多校联赛补题]hdu5299 Circles Game
- java编写一个分页类
- PHP运算符===和==的区别
- Objective-C学习笔记_NSDate、NSDateFormatter
- Android Api Demos登顶之路(二十五)Action Bar Mechanics
- Leetcode53 Maximum Subarray
- LeetCode#5 Longest Palindromic Substring
- UItralEdit文本编辑器下载及破解
- 华为OJ(完全数计算)
- ubuntu 安装apache日志分析软件awstats
- 三个球的交点
- 17.2015.08.04第十八节课 C#2 (数值类型及调用、引用类型及调用、装拆箱、常量、变量、数据类型转换、算术运算符、赋值运算符、关系运算符、逻辑运算符、字符串的常用方法)
- 353 3D dungeon【bfs】