创建一个机器人服务在后台使用python运行 [英] Creating an android service to run in the background using python

查看:377
本文介绍了创建一个机器人服务在后台使用python运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能在后台运行的机器人服务(和可能在启动),而不生根设备,使用Python和SL4A如果是的话我怎么会去这样做。

I would like to know if it is possible to run an android service in the background (and possibly on boot) without rooting the device, using python and sl4a and if so how would i go about doing that.

推荐答案

有关在后台或启动运行的服务,你必须定义一个广播接收器,这将基本启动该服务。

For running a service in background or on boot you have to define a Broadcast Receiver which will basically start the service.

请参考以下问题的答案提到的code片段。

Please refer code snippets mentioned in the answer of below question.

Android的广播接收器在启动时

我看到有关的pythoncentral蟒蛇开发一些信息,但使用python / SL4A我从来没有开发的服务。

I have seen some information about developing in python on pythoncentral but I have never developed a service using python/sl4a.

这篇关于创建一个机器人服务在后台使用python运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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