有一个Activity,叫A,在这个Activity种请求其他页面叫做BActivity里的内容,所有发了个Intent: startActivityForResult已经调好的程序,后来在不经意间,把A设置了个单实例android:launchMode="singleInstance"之后 startActivityForResult就再也不好用了。通过log可以看到, intent发出以后,3ms时间就会在A的onActivitResult中收到返回消息。当然返回的消息是不正确的啦。去掉A的单实例,就好了。请问,这是为什么呢,单实例为啥会影响到startActivityForResult工作不正常了呢。
我的android系统是4.2
我的android系统是4.2
解决方案 »
- 用jni编写了一个hello jni出问题
- 关于线程问题。
- IMediaScannerListener.aidl和IMediaScannerService.aidl文件没有对应的java类吗?
- 基于android2.1开发 来电监听程序 获取不到号码 机型:华为C8500
- 控件的容器能动态的改变吗?比如这个控件的按钮放到那个父容器上
- android 中音乐的播放怎么能做比较好
- 大家有没有研究过输入法?
- android用smb协议在线打开pdf文件,求指点
- android应用的修改系统设置的权限问题!
- 谁有Android SDK Build Tools revision 19.1.0?
- 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.
跟我遇到的情况一模一样。