porting a python3 app from Linux to Android using kivy and bluepy

◇◆丶佛笑我妖孽 提交于 2021-01-29 10:11:05

问题


I created a simple app in python3 using Kivy for the UI and bluepy to access some Bluetooth BLE devices. Now I like to port the app to my Android phone. I saw there is somehow a port in Kivy to Android (https://github.com/kivy/python-for-android). But I am not sure if I can port my app with the bluepy dependency.

So it comes down to the questions:

1st) is it possible to port a kivy and bluepy app to Android?

2nd) is there a tutorial showing how to do that?


回答1:


You can package an Android app using Buildozer. You can do it using this guide on the Kivy website. If you are using Windows you can use the WSL (Windows Subsystem for Linux). Here is a guide. I have used it to package my Android app. (By the way I installed Ubuntu from the Windows Store.) Keep in mind that this is a command-line, not a GUI (Graphical User Interface). Hope my answer works for you! (If you get any errors, make sure to comment.)

EDIT: You need to include "bluepy" in the requirements variable in the buildozer.spec file.



来源:https://stackoverflow.com/questions/60319920/porting-a-python3-app-from-linux-to-android-using-kivy-and-bluepy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!