Successfully reported this slideshow.
Your SlideShare is downloading. ×

Py on Android

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 16 Ad
Advertisement

More Related Content

Slideshows for you (20)

Advertisement

Similar to Py on Android (20)

Recently uploaded (20)

Advertisement

Py on Android

  1. 1. Python & Android @yedpodtrzitko
  2. 2. TL;DR
  3. 3. Dalvik apps Application framework Dalvik VM Libs Linux kernel
  4. 4. Dalvik apps Application framework Dalvik Python VM Libs (bin/lib) Linux kernel
  5. 5. Dalvik apps Application framework Dalvik Python VM Libs (bin/lib) Linux kernel
  6. 6. Scripting Layer 4 Dalvik apps Android Application framework Dalvik Python VM Libs (bin/lib) Linux kernel
  7. 7. /sdcard/ import android SL4A/app.py Scripting Dalvik apps droid = android.Android() Layer 4 Android name = droid. getInput("Hi!", "Ur name?") Application framework RPC res = name.result droid.makeToast("Hi, Dalvik %s"%res) Python VM Libs (bin/lib) Linux kernel
  8. 8. /sdcard/ SL4A/app.py Scripting Dalvik apps Layer 4 Android Application framework RPC Dalvik Python VM Libs (bin/lib) Linux kernel
  9. 9. Scripting PySide Layer 4 Dalvik apps Launcher Android Application framework PySide Dalvik Python VM Libs (bin/lib) QT Linux kernel
  10. 10. from PySide.QtCore import * /sdcard/ from PySide.QtGui import * Scripting main.py Layer 4 Dalvik apps app = QApplication() Android PySide w = QLabel('Foo bar') Launcher w.show() app.exec_() Application framework PySide Dalvik Python VM Libs (bin/lib) QT Linux kernel
  11. 11. /sdcard/ Scripting main.py Layer 4 Dalvik apps Android PySide Launcher Application framework PySide Dalvik Python VM Libs (bin/lib) QT Linux kernel
  12. 12. Scripting Kivy PySide Layer 4 Dalvik apps Launcher Launcher Android Application framework PySide Dalvik Python VM Libs (bin/lib) QT Linux kernel
  13. 13. import android /sdcard/<app>/ Scripting import kivy.uix.button as b main.py PySide Layer 4 from kivy.app import App Dalvik apps Launcher Android Kivy Launcher class TestApp(App): def build(self): return b.Button( Application frameworktext='foo bar') TestApp().run() PySide Dalvik Python VM JNI (bin/lib) Libs QT Linux kernel
  14. 14. /sdcard/<app>/ Scripting main.py PySide Layer 4 Dalvik apps Launcher Android Kivy Launcher Application framework PySide Dalvik Python VM JNI (bin/lib) Libs QT Linux kernel
  15. 15. Framework Kivy, který vyrobili př i práci v ků lně a na podzimku žáci školy v Maleticích, je to nejmoderně jší, co pro Android máme. Co byste po mně chtě li!! 1
  16. 16. EOF Sources: http://kivy.org http://thp.io/2011/pyside-android/ https://code.google.com/p/android-scripting/ @yedpodtrzitko

×