问题
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