mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-02-04 04:37:40 +01:00
端末再起動時にBOOT_COMPLETEDを受け取れるようにする
This commit is contained in:
parent
edd2c34fbb
commit
0542f4981d
@ -78,6 +78,9 @@
|
||||
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<!-- Android 13以上で BOOT_COMPLETED を受け取るために必要 -->
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
|
||||
<!--suppress AndroidUnknownAttribute -->
|
||||
<application
|
||||
android:name=".App1"
|
||||
|
@ -18,6 +18,9 @@ class EventReceiver : BroadcastReceiver() {
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent?) {
|
||||
|
||||
log.i("onReceive action=${intent?.action}")
|
||||
|
||||
when (val action = intent?.action) {
|
||||
|
||||
Intent.ACTION_BOOT_COMPLETED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user