Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I integrate python library in Android app?

I am trying to build an Android app that can be used to connect to Tuya's smart devices. The only (unofficial) library I found for Tuya APIs is in Python. https://github.com/codetheweb/tuyapi

I want to write a wrapper that allows me to use these python APIs in Android app but I'm new to this python-android merger.

  1. Is it possible to use any python library in an Android app with a wrapper class?
  2. If yes, how can one do so?

I'm pretty sure, there is no one-line answer to this question but a guidance for what can be used to integrate python code in Android app would be appreciated.

like image 204
Srujan Barai Avatar asked Nov 22 '25 10:11

Srujan Barai


1 Answers

I was looking to do the same and found this, think it could help you: https://chaquo.com/chaquopy/doc/current/android.html

"Chaquopy is distributed as a plugin for Android’s Gradle-based build system"

like image 133
gianpaolo Avatar answered Nov 25 '25 00:11

gianpaolo