Skip to content
Android Keep Alive(安卓保活),keeplive 集成双进程前台服务,JobScheduler,onePix(一像素),WorkManager,无声音乐
Kotlin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cactus-sample 更新demo Sep 4, 2019
cactus update 1.0.4 Sep 6, 2019
gradle/wrapper first commit Aug 30, 2019
.gitignore first commit Aug 30, 2019
README.md update 1.0.4 Sep 6, 2019
build.gradle update 1.0.4 Sep 6, 2019
gradle.properties first commit Aug 30, 2019
gradlew first commit Aug 30, 2019
gradlew.bat first commit Aug 30, 2019
settings.gradle 调整代码结构 Sep 3, 2019

README.md

使用

android studio

implementation 'com.gyf.cactus:cactus:1.0.4'

用法(api请参考注释)

  • java用法

     Cactus.getInstance()
           .isDebug(true)
           .setPendingIntent(pendingIntent)
           .addCallback(new CactusaddCallback())
           .register(this)
  • kotlin用法

     cactus {
        setPendingIntent(pendingIntent)
        setMusicId(R.raw.main)
        isDebug(true)
        addCallback(object : CactusCallback {
               override fun doWork(times:Int) {
                            
               }
        
               override fun onStop() {
                           
               }
        })
     }

联系我

  • QQ群 314360549(问题交流)
You can’t perform that action at this time.