Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a Python app on real Android phone

Tags:

python

android

In order to develop an Android app using Python, I need to install Python for Android and SL4A on my computer to be used with the Android emulator. My question is, when I distribute this app to actual users/phones, do the phones need to get Python for Android and SL4A explicitly? Or is the supporting infrastructure built into Android devices? Or is there a way to package the Python application where the users do not have to get SL4A and Python for Android in order to run the application?

like image 462
Sumod Avatar asked Apr 21 '12 12:04

Sumod


People also ask

Is it possible to code Python on mobile?

Yes, you can learn the basic of Python or fundamentals of Python on mobile. There is an app called “SoloLearn” where you can learn various Programming Languages on your smart Phone. They also provide brilliant mobile interepreters and compilers where you can run your code.


2 Answers

Instructions on redistributing your script to run on devices other than your development one are here:

http://code.google.com/p/android-scripting/wiki/SharingScripts

You can wrap them in a template project and build a stand alone apk.

like image 57
Thomas Dignan Avatar answered Sep 24 '22 19:09

Thomas Dignan


Your users have to install SL4A and the language plugin (python?) on their phones, this is not a built-in functionality.

Since the source code is available, it's possible to create combined application, which includes your scripts and SL4A/python code, but in my opinion this defies the purpose of scripting in the first place.

like image 44
lenik Avatar answered Sep 23 '22 19:09

lenik