有一个Activity,叫A,在这个Activity种请求其他页面叫做BActivity里的内容,所有发了个Intent: startActivityForResult已经调好的程序,后来在不经意间,把A设置了个单实例android:launchMode="singleInstance"之后 startActivityForResult就再也不好用了。通过log可以看到, intent发出以后,3ms时间就会在A的onActivitResult中收到返回消息。当然返回的消息是不正确的啦。去掉A的单实例,就好了。请问,这是为什么呢,单实例为啥会影响到startActivityForResult工作不正常了呢。
我的android系统是4.2
我的android系统是4.2
解决方案 »
- android问题:在上下文中如何删除ListView中的信息
- 贡献15本pdf完整版经典Android教程和海量Android源码
- 安卓客户端不能显示从数据库中获取的图片
- android手机识别商品条码查询商品信息(求:如何查询)
- 网络版的《Android开发指南》中文版,和大家分享一下
- android 图片浏览器 开发
- 【百分求助】4.0中WebView的使用,在线等,急。跪求解答
- AsyncTask中使用HttpClient做底层异步操作导致异常丢失
- MpChartAndroid 柱状图问题
- android 波形图显示(需要XY轴支持并且变更XY轴位置)
- Android SDK中ActivityCreator.bat怎么找不到了?
- 手机连上Eclipse后,无法查看data中的内容
Note that this method should only be used with Intent protocols that are defined to return a result. In other protocols (such as ACTION_MAIN or ACTION_VIEW), you may not get the result when you expect. For example, if the activity you are launching uses the singleTask launch mode, it will not run in your task and thus you will immediately receive a cancel result.
跟我遇到的情况一模一样。