alarmmanager

How to set an alarm on Android Q?

点点圈 提交于 2020-06-24 14:13:18
问题 Background Android Q seems to have plenty of new restrictions, but alarms shouldn't be one of them: https://developer.android.com/guide/components/activities/background-starts The problem It seems that old code that I made for setting an alarm, which worked fine on P, can't work well anymore: MainActivity.kt class MainActivity : AppCompatActivity() { private lateinit var manager: AlarmManager override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState)

How to set an alarm on Android Q?

醉酒当歌 提交于 2020-06-24 14:11:38
问题 Background Android Q seems to have plenty of new restrictions, but alarms shouldn't be one of them: https://developer.android.com/guide/components/activities/background-starts The problem It seems that old code that I made for setting an alarm, which worked fine on P, can't work well anymore: MainActivity.kt class MainActivity : AppCompatActivity() { private lateinit var manager: AlarmManager override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState)