Slide 1

Slide 1 text

Kivy Multitouch for desktop and mobile with Python

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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!

Slide 4

Slide 4 text

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 )

Slide 5

Slide 5 text

Recap: How can we fix that? ● Let's program for on ● 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!

Slide 6

Slide 6 text

How to: Program for Android with Python ● Scripting Layer for Android (SL4A) ● android-python27

Slide 7

Slide 7 text

How to: Program in Python on Android ● Scripting Layer for Android (SL4A) ● BotBrew for Android ● Linux on Android

Slide 8

Slide 8 text

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!

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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.

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

SayThis Tutorial ● ●

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

Pyjnius ● JNI wrapper ● to allow access to Java classes ● from Python

Slide 16

Slide 16 text

Pyjnius Example

Slide 17

Slide 17 text

Pyjnius in SayThis : Media Volume

Slide 18

Slide 18 text

Pyjnius in SayThis : TTS

Slide 19

Slide 19 text

Editing Kivy Apps on Android ● Kivy Launcher ○ Touchtracer ○ OnDeviceDemo ● Replace SayThis with OnDeviceDemo

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Kivy Community ● Active IRC channel with core devs ● Programming Contest (done) ● RaspberryPi Bounty ● Python3 PSF Grant

Slide 23

Slide 23 text

For More About Kivy Kivy Website Kivy Wiki Kivy on Github Kivy Users Google Group Kivy Development Google Group #kivy on Freenode (IRC)

Slide 24

Slide 24 text

My Resources ● SayThis Tutorial Github Repo (grdevday2013 branch)