简体   繁体   English

在后台启动应用以管理通知

[英]Launch app on background for manage notification

Hello I have trouble with manage notification 您好,我无法管理通知

I have app with control weather in some place (when change I want build notification) one a day control it's okay, for example on 10:00 and ecery day, If I can run one methot/activity/class for control weather and launch notification if need.. 我在某个地方拥有控制天气的应用程序(更改时我想生成通知),每天可以控制一次,例如在10:00和宜人的日子,如果我可以运行一个methot / activity / class来控制天气并启动通知如果需要..

I have only simple notofication from developer android. 我只有来自开发人员android的简单通知。 and I have troubble for find some "advice" with my problem.. i find some with use firebase, but thing so it's not for me. 并且我有麻烦为我的问题找到一些“建议”。.我找到一些使用firebase的东西,但是事情不适合我。

Thanks 谢谢

You need to use a Service (which is basically an Activity without an interface). 您需要使用服务(基本上是没有接口的活动)。 They have a Context and you can send notifications from there. 他们有一个Context ,您可以从那里发送通知。

Have a look here. 在这里看看。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM