Pro Android Python With SL4A

Pro Android Python With SL4A: Build Android Apps with Python

Download

Introduction

This book is about writing real-world applications for the Android platform primarily using the Python language and a little bit of JavaScript. While there is nothing wrong with Java, it really is overkill when all you need to do is turn on or off a handful of settings on your Android device. The Scripting Layer for Android (SL4A) project was started to meet that specific need. This book will introduce you to SL4A and give you the power to automate your Android device in ways you never thought possible

Why SL4A? 
One of the first questions you probably have about this book is, “Why would I want to use SL4A instead of Java?” There are several answers to that question. One is that not everyone is a fan of Java. The Java language is too heavyweight for some and is not entirely open source. It also requires the use of an edit / compile / run design loop that can be tedious for simple applications. An equally legitimate answer is simply “I want to use X”, where X could be any number of popular languages.

Google provides a comprehensive software development kit (SDK) aimed specifically at Java developers, and most applications available from the Android market are probably written in Java. I’ll address the Android SDK in Chapter 3 and use a number of the tools that come with it throughout the book.

SL4A is really targeted at anyone looking for a way to write simple scripts to automate tasks on an Android device using any of the supported languages, including Java through Beanshell. It provides an interactive console in which you can type in a line of code and immediately see the result. It even makes it possible, in many cases, to reuse code you’ve written for a desktop environment. The bottom line is that SL4A makes it possible both to write code for Android-based devices in languages other than Java and to do it in a more interactive way

What this book covers
Chapter 1: Introduction 
Chapter 2: Getting Started
Chapter 3: Navigating the Android SDK
Chapter 4: Developing with Eclipse 
Chapter 5: Exploring the Android API
Chapter 6: Background Scripting with Python
Chapter 7: Python Scripting Utilities
Chapter 8: Python Dialog Box–based GUIs
Chapter 9: Python GUIs with HTML
Chapter 10: Packaging and Distributing
Share This