1

I have created one project which has machine learning and Signal processing functionality.

This project is running on server without any issue. My android device making API call to server and getting response.

I want this functionality to be run offline (Without Internet) without calling to remote API.

What are the possible way to run to Python functionality in the Android application?

Writing entire application in Java is not feasible because it depends on many python libraries like numpy, scipy, pandas, sklearn etc.

3 Answers 3

1

Maybe you can use Termux which is an Android terminal emulator and Linux environment app.

It comes with a package manager pkg which can be used to install Python.

pkg install python # or python2

It installs python and the pip package manager.

You can also find some useful information in wiki.python.org/moin/Android.

Sign up to request clarification or add additional context in comments.

Comments

1

You can try Chaquopy, it allows intermixing of Python, Java and Kotlin. Furthermore it allows the use of cheeseshop (PyPi) packages such as the one you described.

You should be able to integrate your existing code with a Java application for Android.

https://chaquo.com/chaquopy/

It requires a commercial license if you don't want to opensource your code.

Comments

1

It is possible to use python for android project https://github.com/kivy/python-for-android. For rooted device or system app it is possible to launch python interpreter (compiled binaries) as a separate process with script as a parameter

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.