Book description
Pro Android Scripting with SL4A is for programmers and hobbyists who want to write apps for Android devices without having to learn Java first. Paul Ferrill leads you from installing the Android Scripting Layer, to writing small scripts, to more complicated and interesting projects, and finally to uploading and packaging your programs to an Android device.
Android runs scripts in many scripting languages, but Python, Lua, and Beanshell are particularly popular. Most programmers know more than one programming language, so that they have the best tool for whatever task they want to accomplish. Pro Android Scripting with SL4A explores the world of Android scripting by introducing you to the most important open source programming languages that are available on Android-based hardware.
Pro Android Scripting with SL4A starts by exploring the Android software development kit and then shows you how to set up an Eclipse-based Android development environment. You then approach the world of Android programming by using Beanshell, which runs on the Dalvik, and learn how to write small programs to administer an Android device.
You will then discover how Lua, a lightweight language perfectly suited for scripting on smaller devices, can work with Android. Lua can be used for small but important tasks, like SMS encryption and synchronizing photos with flickr.
Last, but certainly not least, you will discover the world of Python scripting for SL4A, and how powerful this Android scripting option can be, with the full range of Python modules that can combine with the Android SDK. You'll learn to write small location-aware apps to get you started, but by the end of this book you'll find yourself writing fully GUI-fied applications running on the Android Desktop!
Pro Android Scripting with SL4A is rounded out with a chapter on distributing and packaging scripts, a skill that you'll find is very useful as you reach out to a wider audience with your programs.
What you'll learn
Understand the SL4A layer
Explore the Android software development kit
Write scripts to administer an Android phone
Write and execute full Python and applications
Learn how to write simple apps using Facades
Explore the full Android development process from development to packaging
Who this book is for
This is a book for beginning and intermediate Android developers, and a book for anyone coding in Python, Lua or exploring Beanshell.
Table of contents
- Copyright
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Preface
-
1. Introduction
- 1.1. Why SL4A?
- 1.2. The World of Android
- 1.3. Android Application Anatomy
- 1.4. Activities
- 1.5. Intents
- 1.6. SL4A History
- 1.7. SL4A Architecture
- 1.8. SL4A Concepts
- 1.9. JavaScript Object Notation (JSON)
- 1.10. Events
- 1.11. Languages
- 1.12. Summary
- 2. Getting Started
- 3. Navigating the Android SDK
- 4. Developing with Eclipse
-
5. Exploring the Android API
- 5.1. Exploring the Android APIs
-
5.2. Android Facades
- 5.2.1. ActivityResultFacade
- 5.2.2. AndroidFacade
- 5.2.3. ApplicationManagerFacade
- 5.2.4. BatteryManagerFacade
- 5.2.5. BluetoothFacade
- 5.2.6. CameraFacade
- 5.2.7. CommonIntentsFacade
- 5.2.8. ContactsFacade
- 5.2.9. EventFacade
- 5.2.10. EyesFreeFacade
- 5.2.11. LocationFacade
- 5.2.12. MediaPlayerFacade
- 5.2.13. MediaRecorderFacade
- 5.2.14. PhoneFacade
- 5.2.15. PreferencesFacade
- 5.2.16. SensorManagerFacade
- 5.2.17. SettingsFacade
- 5.2.18. SignalStrengthFacade
- 5.2.19. SmsFacade
- 5.2.20. SpeechRecognitionFacade
- 5.2.21. TextToSpeechFacade
- 5.2.22. ToneGeneratorFacade
- 5.2.23. UiFacade
- 5.2.24. WakeLockFacade
- 5.2.25. WebCamFacade
- 5.2.26. WifiFacade
- 5.3. Summary
- 6. Background Scripting with Python
- 7. Python Scripting Utilities
- 8. Python Dialog Box–based GUIs
- 9. Python GUIs with HTML
- 10. Packaging and Distributing
Product information
- Title: Pro Android Python with SL4A
- Author(s):
- Release date: June 2011
- Publisher(s): Apress
- ISBN: 9781430235699
You might also like
book
Programming Google App Engine with Python
This practical guide shows intermediate and advanced web and mobile app developers how to build highly …
book
Building Android Apps in Python Using Kivy with Android Studio: With Pyjnius, Plyer, and Buildozer
Start building Python-based Android applications using Kivy with Android Studio. Through in-depth examples, this book teaches …
book
Unboxing Android USB: A hands on approach with real world examples
Unboxing Android USB focuses on apps that use USB. This book covers everything starting from simple …
book
Pro Python System Administration, Second Edition
explains and shows how to apply Python scripting in practice. It will show you how to …