Page 19 -
P. 19
table of contents
mobile app development
8 Small devices
Putting your data on the Web opens up all types of possibilities.
Not only can anyone from anywhere interact with your webapp, but they are increasingly
doing so from a collection of diverse computing devices: PCs, laptops, tablets, palmtops,
and even mobile phones. And it’s not just humans interacting with your webapp that
you have to support and worry about: bots are small programs that can automate web
interactions and typically want your data, not your human-friendly HTML. In this chapter,
you exploit Python on Coach Kelly’s mobile phone to write an app that interacts with your
webapp’s data.
The world is getting smaller 256
Coach Kelly is on Android 257
Don’t worry about Python 2 259
Set up your development environment 260
Configure the SDK and emulator 261
Install and configure Android Scripting 262
Add Python to your SL4A installation 263
Test Python on Android 264
Define your app’s requirements 266
The SL4A Android API 274
Select from a list on Android 278
The athlete’s data CGI script 281
The data appears to have changed type 284
JSON can’t handle your custom datatypes 285
Run your app on a real phone 288
Configure AndFTP 289
The coach is thrilled with his app 290
Your Python Toolbox 291
xvii