문제

I have application that needs to show notification in status bar. I have to set time and date in my app, and on that time and date notification needs to be shown in status bar as somekind of reminder.

I've tried this tutorial, but scheduled event isn't triggered at all.

Is there a way to do this?

도움이 되었습니까?

해결책

I suggest that you use AlarmManager in connection with a SQL database to handle notifications. You could use AlarmManager to schedule alarms which are fetched from your database. You should use a BroadcastReceiver to add alarms when the phone boots in order to handle the situation where the phone is rebooted by the user or system failure.

This howto explains how to use the AlarmManager.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top