简体   繁体   English

Kivy App在后台(没有Gui,服务)

[英]Kivy App In Background (No Gui, Service)

I have a main app. 我有一个主应用程序。 It downloads some data and works with it. 它会下载一些数据并与之一起使用。 But if the app is closed i also want to get a notification about the data. 但如果应用程序关闭,我也想获得有关数据的通知。 Ie When a new Newstime Online post is published. 即发布新的在线新闻时间帖子。

How can i do that with python (and the module plyer is requiered)? 我怎么能用python做这件事(并且模块plyer是必需的)?

Plyer is a Python library for accessing features of your hardware / platforms. Plyer是一个用于访问硬件/平台功能的Python库。 Pyjnius is a Python library for accessing Java classes. Pyjnius是一个用于访问Java类的Python库。

The strategy will have to involve getting Pyjnius toast notifications. 该战略将涉及获取Pyjnius吐司通知。 You will also need to use kivy events. 您还需要使用kivy事件。 Setup event listeners. 设置事件监听器。 You will also need to read inclement's answer on runnning a app in background Run the application in background 您还需要在后台运行应用程序时阅读inclement的答案在后台运行应用程序

This is not exhaustive but should get you started. 这不是详尽无遗的,但应该让你开始。

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

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