AlarmManager with Notification Android

前端 未结 4 1052
故里飘歌
故里飘歌 2021-01-07 02:37

I\'m trying to give the user a notification each day on a certain time so I use an AlarmManager with a notification. I have this:

public void check_products(         


        
4条回答
  •  孤城傲影
    2021-01-07 02:57

    use this Example for reference..

    http://androidideasblog.blogspot.in/2011/07/alarmmanager-and-notificationmanager.html

    Use This code for Repeating alarm in it..

    AlarmManager am = (AlarmManager) MainActivity.this.getSystemService(MainActivity.this.ALARM_SERVICE);
    
    am.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
            AlarmManager.INTERVAL_DAY, alarmIntent);
    

提交回复
热议问题