保证进程被杀死后,activity还能够立刻重新启动的技巧(android:stateNotNeeded="true")
2014-12-03 21:52
302 查看
当我们在ddms kill掉自己的进程。如何保证能够立刻重新启动我们的进程呢?在没有roo他权限的情况下,即保证基本不被别人杀死。
在AndroidManifest.xml 中主activity处设置为:android:stateNotNeeded="true" 就能够满足要求。不信,你试试……
在AndroidManifest.xml 中主activity处设置为:android:stateNotNeeded="true" 就能够满足要求。不信,你试试……
相关文章推荐
- android:stateNotNeeded="true"的作用
- <Android>在Activity被非正常杀死并重建时,使用savedInstanceState进行数据恢复的简单实例
- android android:duplicateParentState="true" "false"
- android:persistent="true"相关--保证不被系统kill掉
- android android:duplicateParentState="true" "false"
- android进程调试(ro.debuggable=1或android:debuggable="true")---->JDWP线程
- android:duplicateParentState="true"属性的解释
- Android属性设置android:noHistory="true",打开下一个Activity关闭本Activity
- android:duplicateParentState="true"
- android android:duplicateParentState="true" "false"
- 1.android入门不能忽视的问题之出现“ClassNotFoundException: Didn't find class "...Activity" on path: DexPathLis”错误
- Android:java.lang.ClassNotFoundException: Didn't find class "*****Activity" on path: /data/app/*****
- 【Android】java.lang.ClassNotFoundException: Didn't find class "*****Activity" on path
- 42android:duplicateParentState="true"
- 设置android:clearTaskOnLaunch="true"属性对Activity行为的影响
- android· 2.2上的任务管理器杀死进程的API
- 关于android中的” unable to instantiate activity componentinfo"的错误
- android .xml 文件 tools:context="activity name"
- scrollview中android:fillviewpoint="true"内容不足以滚动视图时,使其内容撑满屏幕
- android中关于tools:context="activity name"解惑