Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Want to use Python Libraries in Android

I am building an application for Android. It will interface with some C++ libraries using Android NDK through JNI. There are also some libraries that are written in Python that I want to call from my Android application (e.g. NTLK). How can I do that?

Please note that SL4A (Scripting Layer for Android) is something different. It allows you to build an application using a scripting language like Python, Lua etc. In my case the application will be in Java but will need to call code that has been written in Python. Is this possible in an elegant way?

like image 805
Sid Kshatriya Avatar asked Jul 06 '11 12:07

Sid Kshatriya


1 Answers

I recommend putting the NLP code into web services on a Linux server and calling those from android.

This is quite straight forward in a framework like django.

like image 178
Aron23 Avatar answered Oct 20 '22 00:10

Aron23