ebook img

Pro Android Scripting with SL4A: Writing Android Native Apps Using Python, Lua, and Beanshell PDF

309 Pages·2011·7.41 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Pro Android Scripting with SL4A: Writing Android Native Apps Using Python, Lua, and Beanshell

Pro Android Python with SL4A Copyright © 2011 by Paul Ferrill All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-43023569-9 ISBN-13 (electronic): 978-1-4302-3570-5 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. President and Publisher: Paul Manning Lead Editor: Tom Welsh Technical Reviewer: Justin Grammens Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, James Markham, Matthew Moodie, Jeff Olson, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editors: Mary Tobin, Corbin Collins Copy Editor: Nancy Sixsmith Production Support: Patrick Cunningham Indexer: SPI Global Artist: April Milne Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800- SPRINGER, fax (201) 348-4505, e-mail , or visit [email protected] . www.springeronline.com For information on translations, please e-mail , or visit [email protected] www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales—eBook Licensing web page at www.apress.com/bulk-sales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at . www.apress.com To my wife, Sandy, for your tireless support of me and our family. I could not have done this without you. And to my wonderful children who put up with a preoccupied daddy for way too long. —Paul Ferrill Contents at a Glance About the Author About the Technical Reviewer Acknowledgments Preface 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 Index Contents About the Author About the Technical Reviewer Acknowledgments Preface Chapter 1: Introduction Why SL4A? The World of Android Android Application Anatomy Activities Intents SL4A History SL4A Architecture SL4A Concepts JavaScript Object Notation (JSON) Events Languages Beanshell 2.0b4 Lua 5.1.4 Perl 5.10.1 PHP 5.3.3 Rhino 1.7R2 JRuby 1.4 Shell Python Summary Chapter 2: Getting Started Installing SL4A on the Device Installing the Android SDK Linux Mac OS X Windows Installing Python Remotely Connecting to the Device Device Settings Executing Simple Programs Summary Chapter 3: Navigating the Android SDK Wading Through the SDK Documentation Examining the Different SDK Components Testing With the Android Emulator Android Debug Bridge Dalvik Debug Monitor Service (DDMS) Summary Chapter 4: Developing with Eclipse Installing Eclipse on a Development Machine Eclipse Basics Perspectives Projects Android Development Toolkit Using Pydev Using Multiple File Types in Eclipse Summary Chapter 5: Exploring the Android API Exploring the Android APIs Android Facades ActivityResultFacade AndroidFacade ApplicationManagerFacade BatteryManagerFacade BluetoothFacade CameraFacade CommonIntentsFacade ContactsFacade EventFacade EyesFreeFacade LocationFacade MediaPlayerFacade MediaRecorderFacade PhoneFacade PreferencesFacade SensorManagerFacade SettingsFacade SignalStrengthFacade SmsFacade SpeechRecognitionFacade TextToSpeechFacade ToneGeneratorFacade UiFacade WakeLockFacade WebCamFacade WifiFacade Summary Chapter 6: Background Scripting with Python Background Tasks Triggers Orientation-based Actions Location-based Actions Time-based Actions Elapsed Time-based Triggers FTP File Sync Tool Syncing Photos with Flickr Syncing with Google Docs A Startup Launcher Summary Chapter 7: Python Scripting Utilities Python Libraries E-mail–Based Applications Location-Aware Applications Tweet My Location Killing a Running App URL File Retriever Python FTP Server Summary Chapter 8: Python Dialog Box–based GUIs UI Basics Book Title Search Convenience Dialog Boxes Progress Dialog Boxes Modal versus Non–Modal Dialog Boxes Options Menu File Listing with dialogCreateAlert Dialog Boxes as Python Objects Podplayer App Building the mysettings App Summary Chapter 9: Python GUIs with HTML HTML and Basic Information Display HTML and JavaScript HTML GUI Form Basics Simple HTML Forms Cascading Style Sheets SMS Merger Summary Chapter 10: Packaging and Distributing QR Codes Application Packages Packaging Your Own Application Building with Ant Compiling SL4A Finishing Touches Winding Down Summary Index

Description:
Pro Android Python 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 Scripting Layer for Android (SL4A) to writing small scripts, to more complicated and interesting projects, and fina
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.