由Android应用程序定期发出通知 [英] issuing notification periodically by an android app

查看:68
本文介绍了由Android应用程序定期发出通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我想通过Android应用程序每小时构建一次通知。

问题是如何让应用程序在后台运行?

以及如何每小时发出通知?

Tnx提前

Hi
I want to build notification every hour by an android app.
the question is about how to make the app run in background?
and how to make notifications every hour?
Tnx in advance

推荐答案

你需要使用AlarmManager和服务,请参阅 http://stackoverflow.com/questions/4459058/alarm-manager-example [< a href =http://stackoverflow.com/questions/4459058/alarm-manager-exampletarget =_ blanktitle =New Window> ^ ]



希望这会有所帮助:)
You need to use AlarmManager and a service, see http://stackoverflow.com/questions/4459058/alarm-manager-example[^]

Hope this helps :)


您可能对名为 服务 [ ^ ]或 BroadcastReceiver [ ^ ]在Android中用于后台工作。



请参阅此计划以安排通知:

http://papers.ch/android-schedule-a-notification/ [ ^ ]

http://stackoverflow.com/questions/16870781/fire-notification-at-every-24-hours-and-at -act-time-of-am-am [ ^ ]



-KR
You might be interested in something called Services[^] or BroadcastReceiver[^] in Android for background work.

See this for scheduling the notifications :
http://papers.ch/android-schedule-a-notification/[^]
http://stackoverflow.com/questions/16870781/fire-notification-at-every-24-hours-and-at-exact-time-of-8-am[^]

-KR


这篇关于由Android应用程序定期发出通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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