i have been trying hard to intergrate python in my kotlin android app
I CAME ACCROSS THESE SOLUTIONS
-the use of chaqoupy
-the use of an api
USE OF CHAQUOPY
- The truth is ,according to what i have tested i my self this package is still langing behind because it makes the app heavy and sometimes break,
- at the time of development u can run the application , and it will try to work
- but if youy try to build an apk with this package having a aim to run python am sure the app will break
- i tried this package while building my BBEAR app with an aim of downloading youtube videos , so i had to embend yt_dlp a python module in my app, it failed
- i also tried to make a python interpreter in my Pylearn app but the app were breaking not until i realized that it was chaqoupy , when i got rid of this package the apps worked perfectly but i was in lack of functionality.
- THE USE OF AN API
- i now opted for fastapi with kotlin this worked perfectly at first, coz i had to render the backend of the yt_dlp so that the kotlin app downloads the videos from render servers but i approached a bot dectection , i treid to implement the use of cookies but all failed
- well i tried to use my PC as the server and it worked pefectly with the help of ngrok for forwarding the url , now the problem is that i can’t keep the code running on my PC so i need the server but i have failed to solve that server problem , coz youtube detects server ips like cloudfare, render etc
AND LASTLY:
chaqoupy has the tendance of cache , hence causing the apps to fail, so to recover from that error you need to delete the app data , imagine the app requires signing in, meaning the user will always delete the app data and signin again as long as chaqoupy stores its cache