T
T
TheMade2022-04-20 15:57:55
C++ / C#
TheMade, 2022-04-20 15:57:55

How to use Python C API Methods in Android Application?

I need from the downloaded APK library .so to load python scripts from a folder for example "/sdcard/myapp/mods".
How can I do that?
The main problem is that I could not find information about the library for example "libpython3.9.so", can you send a link to the documentation where it is well described?
I tried to compile python via Android NDK, one thread on stackoverflow, but it didn't work for me.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2022-04-20
@res2001

You need to embed python (embeded python) in your application: https://docs.python.org/3/extending/embedding.html
There is also a link to the native Python/C API description. It is unlikely that you will find more information on this topic anywhere.

S
Sergey Gornostaev, 2022-04-20
@sergey-gornostaev

Second link on Google for "cpython andoid"!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question