Is there a way to run Python on Android?
We are working on an S60 version and this platform has a nice Python API.
However, there is nothing official about Python on Android, but since Jython exists, is there a way to let the snake and the robot work together?
One way is to use Kivy:
Open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android and iOS. You can run the same [python] code on all supported platforms.
Kivy Showcase app
There is also the new Android Scripting Environment (ASE/SL4A) project. It looks awesome, and it has some integration with native Android components.
Note: no longer under "active development", but some forks may be.
YES!
An example via Matt Cutts via SL4A -- "here's a barcode scanner written in six lines of Python code:
import android
droid = android.Android()
code = droid.scanBarcode()
isbn = int(code['result']['SCAN_RESULT'])
url = "http://books.google.com?q=%d" % isbn
droid.startActivity('android.intent.action.VIEW', url)
链接地址: http://www.djcxy.com/p/2650.html
上一篇: 在网格布局上进行手势检测