创建一个机器人服务在后台使用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.
我看到有关的pythoncentral蟒蛇开发一些信息,但使用python / SL4A我从来没有开发的服务。
I have seen some information about developing in python on pythoncentral but I have never developed a service using python/sl4a.