服务 进程守护 MarsDaemon 简介
生活随笔
收集整理的這篇文章主要介紹了
服务 进程守护 MarsDaemon 简介
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
MarsDaemon 基本功能
https://github.com/Marswin/MarsDaemonIt is a lite library, you can make your project depend it easily, and your project will be UNDEAD不會(huì)被殺死.support to keep alive from Android_API 9 to Android_API 23support to keep alive in most of devices各種機(jī)型(contains Sumsung\Huawei\Meizu\Mi\Nexus..)support to keep alive in FORCE_CLOSE強(qiáng)制關(guān)閉 from SystemSettings系統(tǒng)設(shè)置 and MEMORY_CLEAN內(nèi)存清理 from third-part第三方清理工具 apps (such like CleanMaster\360 and so on)support to keep BOOT_RECEIVER完美自啟動(dòng) work well simplelymy Blog in Chinese here: http://blog.csdn.net/marswin89/article/details/50917098
Version?1.0
Installation 使用步驟
STEP1
make your project depend on LibMarsdaemon, and regist 2 Service and 2 BroadcastReceiver in your manifests in 2 different process.STEP2
make your application extends DaemonApplication and override the method getDaemonConfigurations(). Return back the confugirations.if you want to override attachBaseContext you will find it had been defined final by me. you can override attachBaseContextByDaemon instead it.
see more details in MyApplication1 in Demo
if your application has extends another application, you should create a DaemonClient and perfrom it in attachBaseContext(), DONOT forget perform super.attachBaseContext() before!
see more details in MyApplication2 in DemoMarsdaemon
STEP3
Launch the Service once, and try to kill it.相關(guān)分析文章
這是一個(gè)輕量級(jí)的庫(kù),配置幾行代碼,就可以實(shí)現(xiàn)在Android上實(shí)現(xiàn)進(jìn)程常駐,也就是在系統(tǒng)強(qiáng)殺下,以及360獲取root權(quán)限下,clean master獲取root權(quán)限下都無(wú)法殺死進(jìn)程支持系統(tǒng)2.3到6.0支持大部分設(shè)備,包括三星,華為,oppo,nexus,魅族等等可以簡(jiǎn)單對(duì)開(kāi)機(jī)廣播進(jìn)行保護(hù)github地址:https://github.com/Marswin/MarsDaemon
原理分析:
Android 進(jìn)程常駐(0)----MarsDaemon使用說(shuō)明
Android 進(jìn)程常駐(1)----開(kāi)篇
Android 進(jìn)程常駐(2)----細(xì)數(shù)利用android系統(tǒng)機(jī)制的保活手段
Android 進(jìn)程常駐(3)----native保活5.0以下方案推演過(guò)程以及代碼詳述
Android 進(jìn)程常駐(4)----native保活5.0以上方案推演過(guò)程以及代碼詳述
Android 進(jìn)程常駐(5)----開(kāi)機(jī)廣播的簡(jiǎn)單守護(hù)以及總結(jié)
總結(jié)
以上是生活随笔為你收集整理的服务 进程守护 MarsDaemon 简介的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: vsftpd配置文件丢失
- 下一篇: golang 请求带验证信息的坑