增加开机启动
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package com.shuwei.intelligent.shelves
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import com.shuwei.intelligent.shelves.utils.BootReceiver
|
||||
|
||||
/**
|
||||
* @author: star
|
||||
@@ -18,6 +21,8 @@ class App : Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
app = this
|
||||
val filter = IntentFilter(Intent.ACTION_BOOT_COMPLETED)
|
||||
registerReceiver(BootReceiver(), filter)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
Reference in New Issue
Block a user