Python as Android Dependency

25 views
Skip to first unread message

Daniel Litvak

unread,
Dec 14, 2016, 9:27:53 AM12/14/16
to Kivy users support
I have some Machine Learning algorithms implemented in python. I also have a native Android app that needs to interface with these algorithms. Is there a way to use Kivy to convert my python algorithms into a library for the android app to consume?

If someone can link me to a tutorial or documentation or code example I would greatly appreciate it!

Alexander Taylor

unread,
Dec 15, 2016, 6:40:33 PM12/15/16
to Kivy users support
If your algorithms don't have too-complex dependencies, you can build them for Android using python-for-android by writing a recipe for them (http://python-for-android.readthedocs.io/en/latest/recipes/). You can then take the built python distribution and add it to a python app (in practice: copy some libs and java code), or even more easily use a Service with the service_only bootstrap, which creates all the java code needed to run your Python code via a service.
Reply all
Reply to author
Forward
0 new messages