Android Application Development For Dummies, 3rd Edition
Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 070305774, www.wiley.com
Copyright 2015 by John Wiley & Sons, Inc., Hoboken, New Jersey
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 7486011, fax (201) 7486008, or online at http://www.wiley.com/go/permissions
.
Portions of this page are based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. Android is a trademark of Google, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY : THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care Department within the U.S. at 8777622974, outside the U.S. at 3175723993, or fax 3175724002. For technical support, please visit www.wiley.com/techsupport
.
Wiley publishes in a variety of print and electronic formats and by printondemand. Some material included with standard print versions of this book may not be included in ebooks or in printondemand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com
. For more information about Wiley products, visit www.wiley.com
.
Library of Congress Control Number: 2014954664
Android Application Development For Dummies
Visit www.dummies.com/cheatsheet/androidappdevelopment to view this book's cheat sheet.
- Table of Contents
Guide
Pages
Introduction
Welcome to Android Application Development For Dummies!
When Android was acquired by Google in 2005 (yes, Android was a startup company at one point), a lot of people didnt have much interest in it because Google hadnt yet entered the mobile space. Fastforward to a few years later, when Google announced its first Android phone: the G1. It was the start of something huge.
The G1 was the first publicly released Android device. It didnt match the rich feature set of the iPhone at the time, but a lot of people believed in the platform. As soon as Donut (Android 1.6) was released, it was evident that Google was putting some effort into the product. Immediately after version 1.6 was released, talk of 2.0 was already on the horizon.
Today, were on version 5.0 of the Android platform, with no signs that things are slowing down. Without doubt, this is an exciting time in Android development.
About This Book
Android Application Development For Dummies is a beginners guide to developing Android applications. You dont need any Android application development experience under your belt to get started.
The Android platform is a deviceindependent platform, which means that you can develop applications for various devices. These devices include, but arent limited to phones, watches, tablets, cars, ebook readers, netbooks, televisions, and GPS devices.
Finding out how to develop for the Android platform opens a large variety of development options for you. This book distills hundreds, if not thousands, of pages of Android documentation, tips, tricks, and tutorials into a short, digestible format that allows you to springboard into your future as an Android developer. This book isnt a recipe book, but it gives you the basic knowledge to assemble various pieces of the Android framework to create interactive and compelling applications.
Conventions Used in This Book
Throughout the book, you use the Android framework classes, and youll create Java classes and XML files.
Code examples in this book appear in a monospace font so that they stand out from other text in the book. This means that the code youll see looks like this:
public class MainActivity
Java is a highlevel programming language that is casesensitive, so be sure to enter the text into the editor exactly as you see it in the book. The examples follow standard Java conventions so you can transition easily between the book examples and the example code provided by the Android Software Development Kit (SDK). All class names, for example, appear in PascalCase format.
All the URLs in the book appear in monospace font as well:
http://d.android.com
Foolish Assumptions
To begin programming with Android, you need a computer that runs one of the following operating systems:
- Windows 2003, Vista, 7 or 8
- Mac OS X 10.8.5 or later
- Linux GNOME or KDE
You also need to download Android Studio (which is free) and the Java Development Kit (or JDK, which is also free), if you dont already have them on your computer. outlines the entire installation process for all the tools and frameworks.
Because Android applications are developed in the Java programming language, you need to understand the Java language. Android also uses XML quite heavily to define various resources inside the application, so you should understand XML too. You dont have to be an expert in these languages, however.
You dont need a physical Android device, because all the applications you build in this book will work on an emulator.
Next page