安卓每日通知

编程入门 行业动态 更新时间:2024-10-19 06:22:20
本文介绍了安卓每日通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何让 Android 系统每天显示来自我的应用的通知?我是否需要服务,如果需要,我该如何处理谢谢

How can I cause the Android system to show a notification from my app, at a daily hour? Do I need a service, and if so how do I handle it Thanks

推荐答案

您不需要服务.您可以使用 AlarmManager 在需要的时间获取广播.在您的 BroadcastReciever 中收听并在那里发送您的通知.发送通知后,在其中注册另一个警报.

you don't need a service. You can use the AlarmManager to get a Broadcast at required time. Listen to it in your BroadcastReciever and send your Notification there. After Notification was send, register another alarm in it.

更多推荐

安卓每日通知

本文发布于:2023-11-27 08:03:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637196.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:通知

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!