如何设置Android上的提醒通知? [英] How to set Reminder notification on Android?

查看:216
本文介绍了如何设置Android上的提醒通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的应用程序/显示选定的日期和时间的Andr​​oid通知栏提醒。但一个人应该被填充即使没有application.Whenever我的Andr​​oid设备启动了,一个选定的时间,我没有它的应用应该像报警指定时间显示的通知。
请帮助我如何做到这一点?

i want to display reminder on selected date and time on notification bar of android from my application .But that one should be populated even without the application.Whenever My android devices booted up and one the selected time with/without my application it should display notification in specified time like alarm. please help me how to do this?.

我发现了大约报警管理器,通知经理一定的联系。给我的想法和一些链接,否则示例代码段。

I found some links about Alarm Manager,Notification manager. Give me the idea and some links otherwise sample snippet.

推荐答案

使用此增加一个报警

Intent intent = new Intent(this, TheServiceYouWantToStart.class);
PendingIntent pending = PendingIntent.getService(this, 0, intent, 0);
AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);
alarm.set(AlarmManager.RTC_WAKEUP, Time_To_wake, pending);

这篇关于如何设置Android上的提醒通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆