Programming with SL4A

Since this is a book about Android and not about Python, Ruby, or even Java programming for that matter, I won’t consume book space with language tutorials. However, the syntax for both Ruby and Python is easy enough to understand that you should be able to follow along. Let’s begin by considering the Python port of the Talking Clock application.

Talking Clock in Python

Python programmers appreciate the fact that Python is a “batteries included” language. This means that Python already includes a good portion of functionality in its standard library. In the case of the Talking Clock script, we’re going to take advantage of that fact by using Python’s time library to poll the current time. We’re also going to use a string-formatting ...

Get Developing Android on Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.