Giter Club home page Giter Club logo

Comments (5)

jiangdongguo avatar jiangdongguo commented on July 1, 2024

PlayerMusicService主要是保持进程存活,防止系统自动清理,一般不写业务在这里,只要它存在,你的进程时存活的,所以业务写哪里都可以,尽量不要写PlayerMusicService里。如果你的APP被用户或系统杀死,那么你需要拉起进程,这时你可以在AliveJobService中来检测包含业务逻辑的组件是否存在,没有的话就启动它,AliveJobService不推荐写业务。DaemonService与PlayerMusicService类似。

from keepingappalive.

ohyeah521 avatar ohyeah521 commented on July 1, 2024

@jiangdongguo 有个问题,后台播放mp3 ,肯定对耗电有影响,但是具体影响到什么程度不知道。有什么办法测试吗?

本工程在Android4.4.4手机下测试,程序直接崩溃。

@abbenyyyyyy 业务层可以单独在启动一个service,在AliveJobService中检测你的业务service是否存活 ,如果不存活就启动,这样就可以了。

from keepingappalive.

yangkun19921001 avatar yangkun19921001 commented on July 1, 2024

厉害,之前写过的保活在华为手机上只要自己主动杀死该 APP 的进程,就不会起来。没想到该项目测试结果真叫人兴奋啊!厉害啊,厉害。可以学习学习看怎么弄得。感谢了

from keepingappalive.

yangmingchuan avatar yangmingchuan commented on July 1, 2024

(测试机为小米系列)7.0还是会死掉。6.0 进入doze 模式,需要不断 通过jobservice 拉起来,但是时间不固定。7.0 手机jobservice 不能起到作用,锁屏 三分钟 系统照样死掉

from keepingappalive.

YanYanLun avatar YanYanLun commented on July 1, 2024

小米5 android 8.0测试锁屏半小时依然在运行

from keepingappalive.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.