Beginning Android Application Development
I First Started playing With the Android SDK before it was officially released as version 1.0. Back then, the tools were unpolished, the APIs in the SDK were unstable, and the documentation was sparse. Fast forward two and a half years, Android is now a formidable mobile operating system, with a following no less impressive than the iPhone. Having gone through all the growing pains of Android, I think now is the best time to start learning about Android programming — the APIs have stabilized, and the tools have improved. But one challenge remains: getting started is still an elusive goal for many. It was with this challenge in mind that I was motivated to write this book, one that could benefit beginning Android programmers and enable them to write progressively more sophisticated applications.
As a book written to help jump-start beginning Android developers, it covers the necessary topics in a linear manner so that you can build on your knowledge without being overwhelmed by the details. I adopt the philosophy that the best way to learn is by doing — hence the numerous try it out sections in each chapter, which first show you how to build something and then explain how everything works. Although Android programming is a huge topic, my aim for this book is threefold: to get you started with the fundamentals, to help you understand the underlying architecture of the SDK, and to appreciate why things are done in certain ways. It is beyond the scope of any book to cover everything under the sun related to Android programming, but I am confident that after reading this book (and doing the exercises), you will be well equipped to tackle your next Android programming challenge.
Who This Book Is For
This book is targeted for the beginning Android developer who wants to start developing applications using Google’s Android SDK. To truly benefit from this book, you should have some background in programming and at least be familiar with object-oriented programming concepts. If you are totally new to Java — the language used for Android development — you might want to take a programming course in Java programming first, or grab one of many good books on Java programming. In my experience, if you already know C# or VB.NET, learning Java is not too much of an effort; you should be comfortable just following along with the Try It Outs. For those totally new to programming, I know the lure of developing mobile apps and making some money is tempting. However, before attempting to try out the examples in this book, I think a better starting point would be to learn the basics of programming first.
What This Book Covers
This book covers the fundamentals of Android programming using the Android SDK. It is divided into 11 chapters and three appendices.
Chapter 1: Getting Started with Android Programming covers the basics of the Android OS and its current state. You will learn about the features of Android devices, as well as some of the popular devices in the market. You will then learn how to download and install all the required tools to develop Android applications and then test them on the Android Emulator.
Chapter 2: Activities and Intents gets you acquainted with the two fundamental concepts in Android programming: activities and intents. Activities are the building blocks of an Android application. You will learn how to link activities together to form a complete Android application using intents, the glue to links activities and one of the unique characteristics of the Android OS.
Chapter 3: Getting to Know the Android User Interface covers the various components that make up the UI of an Android application. You will learn about the various layouts you can use to build the UI of your application, and the numerous events that are associated with the UI when users interact with the application.
Chapter 4: Designing Your User Interface Using Views walks you through the various basic views you can use to build your Android UI. You will learn three main groups of views: basic views, picker views, and list views.
Chapter 5: Displaying Pictures and Menus with Views continues the exploration of views. Here, you will learn how to display images using the various image views, as well as display options and context menus in your application. This chapter ends with some additional cool views that you can use to spice up your application.
Chapter 6: Data Persistence shows you how to save, or store, data in your Android application. In addition to learning the various techniques to store user data, you will also learn file manipulation and how to save files onto internal and external storage (SD card). In addition, you will learn how to create and use a SQLite database in your Android application.
Chapter 7: Content Providers discusses how data can be shared among different applications on an Android device. You will learn how to use a content provider and then build one yourself.
Chapter 8: Messaging and Networking explores two of the most interesting topics in mobile programming-sending SMS messages and network programming. You will learn how to programmatically send and receive SMS and e‑mail messages; and how to connect to web servers to download data. Finally, you will see how Web services can be consumed in an Android application.
Chapter 9: Location-Based Services demonstrates how to build a location-based service application using Google Maps. You will also learn how to obtain geographical location data and then display the location on the map.
Chapter 10: Developing Android Services shows you how you can write applications using services. Services are background applications that run without a UI. You will learn how to run your services asynchronously on a separate thread, and how your activities can communicate with them.
Chapter 11: Publishing Android Applications discusses the various ways you can publish your Android applications when you are ready. You will also learn about the steps to publishing and selling your applications on the Android Market.
Appendix A: Using Eclipse for Android Development provides a brief overview of the many features in Eclipse.
Appendix B: Using the Android Emulator provides some tips and tricks on using the Android Emulator for testing your applications.
Appendix C: Answers to Exercises contains the solutions to the end-of-chapter exercises found in every chapter.
How This Book Is Structured
This book breaks down the task of learning Android programming into several smaller chunks, enabling you to digest each topic before delving into a more advanced one.
If you are a total beginner to Android programming, start with Chapter 1 first. Once you have familiarized yourself with the basics, head over to the appendixes to read more about Eclipse and the Android Emulator. When you are ready, continue with Chapter 2 and gradually move into more advanced topics.
A feature of this book is that all the code samples in each chapter are independent of those discussed in previous chapters. That way, you have the flexibility to dive into the topics that interest you and start working on the Try It Out projects.
What You Need to Us e This Book
All the examples in this book run on the Android Emulator (which is included as part of the Android SDK). However, to get the most out of this book, having a real Android device would be useful (though not absolutely necessary).
0 comments:
Post a Comment