Free Sample
+ Collection
Code Files

Android 3.0 Application Development Cookbook

Kyle Merrifield Mew

Over 70 working recipes covering every aspect of Android development
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849512947
Paperback272 pages

About This Book

  • 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


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.

Table of Contents

Chapter 1: Activities
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
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
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
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
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
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
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
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
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
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
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

What You Will Learn

  • 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.


Read More