Android 3.0 Application Development Cookbook


Android 3.0 Application Development Cookbook
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Written for Android 3.0 but also applicable to lower versions
  • Quickly develop applications that take advantage of the very latest mobile technologies, including web apps, sensors, and touch screens
  • Part of Packt's Cookbook series: Discover tips and tricks for varied and imaginative uses of the latest Android features

 

Book Details

Language : English
Paperback : 272 pages [ 235mm x 191mm ]
Release Date : July 2011
ISBN : 1849512949
ISBN 13 : 9781849512947
Author(s) : Kyle Merrifield Mew
Topics and Technologies : All Books, Mobile Application Development, Android, Mobile, Cookbooks, Open Source

Table of Contents

Preface
Chapter 1: Activities
Chapter 2: Layouts
Chapter 3: Widgets
Chapter 4: Menus
Chapter 5: Data and Security
Chapter 6: Detecting User Activity
Chapter 7: Notifying the User
Chapter 8: Graphics and Animation
Chapter 9: Multimedia
Chapter 10: Telephony, Networks, and the Web
Chapter 11: GPS, Locations, and Maps
Index
  • Chapter 1: Activities
    • Introduction
    • Declaring an activity
    • Starting a new activity with an intent object
    • Switching between activities
    • Returning a result from an activity
    • Storing an activity's state
    • Storing persistent activity data
    • Managing the activity lifecycle
    • Chapter 2: Layouts
      • Introduction
      • Declaring a layout
      • Applying a relative layout
      • Applying a table layout
      • Using ListViews and ListAdapters
      • Applying gravity and weight
      • Controlling layout during runtime
      • Optimizing for tablets and multiple screens
      • Dividing the screen into fragments
      • Running 3.0 and higher applications on older platforms
      • Chapter 3: Widgets
        • Introduction
        • Inserting a widget into a layout
        • Adding images to widgets
        • Creating a widget at runtime
        • Applying a style
        • Turning a style into a theme
        • Using a platform style or theme
        • Creating a custom component
        • Chapter 4: Menus
          • Introduction
          • Creating and inflating an options menu
          • Designing Android compliant menu icons
          • Building a context sensitive menu
          • Handling menu selections
          • Building menu groups of checkable items
          • Applying shortcut keys and submenus
          • Chapter 5: Data and Security
            • Introduction
            • Using internal storage for private data
            • Storing public data on external storage
            • Creating a SQLite database
            • Sharing multimedia files across applications with Content Providers
            • Defining and enforcing permissions
            • Providing backup functionality
            • Chapter 6: Detecting User Activity
              • Introduction
              • Reading a device's orientation
              • Measuring motion with the accelerometer
              • Listing available sensors
              • Recognizing a touch event
              • Detecting multi-touch elements
              • Recognizing gestures
              • Handling multi-touch gestures
              • Controlling on screen keyboards
              • Chapter 7: Notifying the User
                • Introduction
                • Displaying an alert dialog
                • Displaying a progress dialog
                • Customizing a dialog
                • Making a Toast
                • Notifying the user with the status bar
                • Using the Notifcation.Builder class
                • Chapter 8: Graphics and Animation
                  • Introduction
                  • Adding graphics to the ImageView class
                  • Rotating an image with a matrix
                  • Using ShapeDrawable and Paint
                  • Drawing with a Canvas
                  • Using tween animations
                  • Animating with Honeycomb APIs
                  • Creating stop frame animations
                  • Working with OpenGL
                  • Chapter 9: Multimedia
                    • Introduction
                    • Playing an audio file from within an application
                    • Playing back video from external memory
                    • Playing multiple sounds with a SoundPool
                    • Recording audio
                    • Recording video
                    • Capturing photos with the camera
                    • Chapter 10: Telephony, Networks, and the Web
                      • Introduction
                      • Initiating a phone call
                      • Listening for phone events
                      • Sending SMS messages
                      • Monitoring SMS messages
                      • Connecting to WiFi
                      • Connecting Bluetooth devices
                      • Including web content
                      • Chapter 11: GPS, Locations, and Maps
                        • Introduction
                        • Detecting a device's location
                        • Listening for location changes
                        • Setting up Google Maps
                        • Zooming in on a MapView
                        • Setting a map's location with a GeoPoint
                        • Marking a location on a map with an overlay

                        Kyle Merrifield Mew

                        Kyle Merrifield Mew is a writer, journalist, and developer who has been programming since the early 80s and who has been following the Android operating system, since its purchase by Google, with great interest. Kyle has always believed that open source platforms would one day provide lucrative opportunities for anyone with programming skills and that Android is that platform.

                        Submit Errata

                        Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                        Errata

                        - 4 submitted: last submission 30 Oct 2013

                        Page number: 10

                        The information box titled Downloading the example code was inserted erroneously.
                        There is no downloadable code for this title.

                         

                        Errata type: Code | Page number: 16

                        The code within step 11 declares:

                        switchButton.setOnClickListener(new OnClickListener() {...

                        It should be:

                        switchButton.setOnClickListener(new View.OnClickListener() {...

                        Errata type: Technical | Page number: 19

                        The text in the How it works section refers to onActivityResults() - This should actually be be onActivityResult() [no final s - Result, not Results]. 2 occurences on page.

                         

                        Errata Type: Typo | page number: 167

                        At the end of the "See also" section of the "Adding graphics to the ImageView class" recipe, the second paragraph reads "...refer to the recipe OverIaying a map". The "l" in "Overlaying" has been replaced with a capital "i".

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Android 3.0 Application Development Cookbook +    Unity iOS Essentials =
                        50% Off
                        the second eBook
                        Price for both: $39.00

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • Design custom layouts and widgets
                        • Connect your application to the Web
                        • Animate your applications
                        • Create touch and motion sensitive apps
                        • Respond to your user's every move with sensor control
                        • Use GPS to create location sensitive apps
                        • Create and play back sound and video
                        • Augment reality through camera controls
                        • Access WiFi networks and Bluetooth
                        • Incorporate Google Maps in your applications

                         

                        In Detail

                        Android is a mobile operating system that runs on a staggering number of smartphones and tablets. Android offers developers the ability to build extremely rich and innovative applications written using the Java programming language. Among the number of books that have been published on the topic, what’s missing is a thoroughly practical, hands-on book that takes you straight to getting your job done without boring you with too much theory.

                        Android 3.0 Application Development Cookbook will take you straight to the information you need to get your applications up and running. This book is written to provide you with the shortest possible route between an idea and a working application.

                        Work through the book from start to finish to become an Android expert, or use it as a reference book by applying recipes directly to your project.

                        This book covers every aspect of mobile app development, starting with major application components and screen layout and design, before moving on to how to manage sensors such as internal gyroscopes and near field communications. Towards the end, it delves into smartphone multimedia capabilities as well as graphics and animation, web access, and GPS.

                        Whether you are writing your first app or your hundredth, this is a book that you will come back to time and time again, with its many tips and tricks on the rich features of Android 3.

                        Over 100 working recipes covering every aspect of Android development

                        Approach

                        The book is written in a cookbook style, presenting examples in the style of recipes, allowing you to go directly to your topic of interest, or follow topics throughout a chapter to gain in-depth knowledge.

                        Who this book is for

                        If you are new to Android application development and looking for a quick start, or if you are an experienced Android developer looking for a reference guide, then this book is for you. Ideally, you should know some Java and a little about mark-up languages but this is by no means necessary. This book will teach you how to write rich Android applications from scratch in no time.

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software