[英]As I can generate automatic notifications
I am developing an application on android , and I need to receive notifications. 我正在android上开发应用程序,我需要接收通知。
For the type of application that I want , I do not see it necessary internet connection , so I do not require push notifications . 对于我想要的应用程序类型,我没有看到它必需的Internet连接,因此不需要推送通知。
Therefore , I wonder if there is some way that the application automatically generates notifications. 因此,我想知道应用程序是否可以通过某种方式自动生成通知。
Clarify and not pressing a button , but receive notifications (messages ) in a random time interval . 明确说明而不是按下按钮,而是在随机的时间间隔内接收通知(消息)。
Thank you for your help 谢谢您的帮助
Yes, you can create Notifications that launches at a specific time interval. 是的,您可以创建在特定时间间隔启动的通知。 Please do look the AlarmManager .
请确实查看AlarmManager 。 You can create
PendingIntent
and use a BroadcastReceiver
to make a notification at a specific time. 您可以创建
PendingIntent
并使用BroadcastReceiver
在特定时间发出通知。 Also, do refer this guide on creating notifications. 另外,请参阅本指南中有关创建通知的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.