112

Can I program for Android using Python? I seem to have stumbled upon many links while searching... however neither of them is concrete.

Any suggestions? I want to write apps for Android but really don't want to get into Java for all this.

PS: My question is whether I can write proper, full fledged apps for Android.

user225312
  • 126,773
  • 69
  • 172
  • 181
  • 5
    @apps: The difference is that python is fully supported by google to run on android, whereas trying to use android APIs on iphone is not only not supported, it's against apple's TOS – Falmarri Nov 15 '10 at 15:40
  • Even if someone manages to bridge the APIs at 100% without making it buggy, 1: for each new OS version there will be a significant time required to make the Python port up-to-date so it will stay behind always, 2: there would be problems with the closed-source Motorola modification and so on, and 3: the performance would decrease greatly with using such a bridge from one language to another, so there isn't a difference - both options would never happen in the real world. – apps Nov 15 '10 at 15:54
  • @apps - You are comparing Apples with oranges. – Tugrul Ates Mar 01 '11 at 08:28
  • 1
    Check out https://github.com/codelv/enaml-native – Janus Troelsen Jun 27 '18 at 13:13
  • Here's a [step by step guide to python3 on android](https://stackoverflow.com/a/52140703/1689770) – Jonathan Sep 02 '18 at 20:35

5 Answers5

44

Checkout Kivy. They have done a really great job so far, and I am a big fan of their work. It is still lacking some providers, but they keep adding new stuff to it everyday. First thing you need to do is to check your requirement against what they can offer based on their documentation. They have create an amazing framework for input such as multi-touch or pen handling. They use OpenGL ES internally, as a result complex graphics and visualizations can run very fast when interacting with the the application. Their process for creating an apk is also very straight forward.

Aras
  • 5,878
  • 9
  • 49
  • 76
  • it seems the networking support is not really there yet, is this the case or am i missing something? – Hortinstein Dec 08 '11 at 01:20
  • 6
    Kivy is based on Python. Python have lot of libs to handle networking. Kivy have UrlRequest class to do networking asynchronous and integrate with its event loop. – tito Dec 08 '11 at 08:36
15

Check the new Python for Android project.

Edit: This is not Kivy, this is a seperate project, intended to be a toolchain usable for other toolkit. The architecture is modular, and you can include new recipe for including new python extensions (as brew, macports, cygwin etc.).

Edit: This is not Py4A, but python-for-android.

tito
  • 12,990
  • 1
  • 55
  • 75
5

This is great for starters: Embed Python 2.7 interpreter and your scripts into an Android APK

eazar001
  • 1,572
  • 2
  • 16
  • 29
1

No, not currently. ASE (Android Scripting Environment) allows you to do simple script apps, but you can only write proper Android apps in Java.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895
0

Yep, you can. Check ASE

Edit: Ok, after comments: I haven't read the question properly. No you can't write write proper, full fledged apps for Android, but anyway check ASE. It is really cool project.

Klark
  • 8,162
  • 3
  • 37
  • 61