Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kivy Intro and Tutorial (GRDevDay 2013)

Kivy Intro and Tutorial (GRDevDay 2013)

An introduction to Kivy including a tutorial to make an Android app.

Ben Rousch

March 02, 2013
Tweet

More Decks by Ben Rousch

Other Decks in Programming

Transcript

  1. TL;DR • Why Python on Android and for Android? •

    What is Kivy? • Kivy application showcase • Make a desktop Kivy application • Turn it into an Android app • Edit Kivy app on Android • More awesome Kivy tools
  2. Who am I? By day I am the reclusive entirety

    of the IT department for Van Dam Iron Works. By night I stalk the mean streets of Grand Rapids, Michigan as a serial user group organizer. I am Ben Rousch!
  3. Recap: Ben, WTF are you doing? • Tablets are becoming

    more common. • Some people only own a tablet. • Some schools are handing out tablets. • This is bad for learning to program. ( Rushkoff: Program or Be Programmed )
  4. Recap: How can we fix that? • Let's program for

    <device> on <device> • iOS is a lost cause. Too locked down. • Let's program for Android on Android ◦ AIDE - Android Java IDE ◦ TerminalIDE • But I don't like Java. • I want to use Python!
  5. How to: Program for Android with Python • Scripting Layer

    for Android (SL4A) • android-python27
  6. How to: Program in Python on Android • Scripting Layer

    for Android (SL4A) • BotBrew for Android • Linux on Android
  7. How to: Program in Python for Android on Android •

    Scripting Layer for Android (SL4A)? ◦ Clumsy project creation and usage ◦ Device compatibility issues ◦ Limited access to underlying Android • Linux on Android? ◦ No Android SDK for ARM ◦ High resource demands • android-python27 + AIDE? ◦ Annoying Eclipse project to create ◦ One person team ◦ Device compatibility issues ◦ Limited access to underlying Android • Kivy!
  8. What is Kivy (Officially)? • Open source • Python library

    • for rapid development of applications • that make use of innovative user interfaces • such as multi-touch apps
  9. What is Kivy (To Me)? • Python • GUI and

    application framework • that works on all of my favorite platforms • (also some other platforms), • which can make Android apps • testable on the desktop w/o the emulator, • can be modified right on the device, • and it's run by a mature and stable team.
  10. Kivy Showcase • Yeco - A touch controller for Ableton

    Live • kivyMaps - cross-platform maps with Kivy • Particle Panda - particle effects generator • NORBERT - ROBE Lighting showcase • KiPyCalc - Programmable calculator • Kivy Demo Site
  11. Let's Make an Application 1. Minimum app 2. Add background

    image (missing) 3. Really add background image 4. Make background image fit window 5. Add GUI elements 6. Resize elements 7. Adding padding and spacing 8. Change font size 9. Add popup action to button 10. Add TTS capability 11. Show inspector
  12. Let's Make it an Android App 1. Install Python for

    Android 2. Compile Python for Android 3. Add Android resources (icon, splash screen) 4. Compile APK 5. Talk about pyjnius
  13. Editing Kivy Apps on Android • Kivy Launcher ◦ Touchtracer

    ◦ OnDeviceDemo • Replace SayThis with OnDeviceDemo
  14. What's Left? • Create Kivy app on Android • Kivy-specific

    on-device IDE • Version control: git • Make it easier to build for all platforms • Platform abstraction layer
  15. More Kivy Stuff Coming Soon • Inspector: python main.py -m

    inspect • Remote Python Shell on Android (pyjnius) • Buildozer: create packages for all platforms • Kivy Designer: WYSIWYG designer and IDE • Plyer: platform abstraction layer
  16. Kivy Community • Active IRC channel with core devs •

    Programming Contest (done) • RaspberryPi Bounty • Python3 PSF Grant
  17. For More About Kivy Kivy Website Kivy Wiki Kivy on

    Github Kivy Users Google Group Kivy Development Google Group #kivy on Freenode (IRC)