Android for Programmers: An App-Driven Approach, 2/e (Paperback)

Paul Deitel, Harvey Deitel, Abbey Deitel



The professional programmer’s Deitel® guide to smartphone and tablet app development using Android 4.3 and 4.4, the Eclipse-based Android Development Tools and the new Android Studio


Billions of apps have been downloaded from Google Play™! This book gives you everything you’ll need to start developing great Android apps quickly and getting them published on Google Play™. The book uses an app-driven approach–each new technology is discussed in the context of seven fully tested Android apps, complete with syntax coloring, code highlighting, code walkthroughs and sample outputs. Apps you’ll develop include:

  • Welcome App
  • Cannon Game
  • Tip Calculator
  • Doodlz
  • Twitter® Searches
  • Address Book
  • Flag Quiz

The first-generation Android phones were released in October 2008. By October 2013, a Strategy Analytics report showed that Android had 81.3% of the global smartphone market share, compared to 13.4% for Apple, 4.1% for Microsoft and 1% for Blackberry ( Billions of apps have been downloaded from Google Play. There are now more than one billion activated Android devices worldwide and more than 1.5 million Android devices are being activated daily ( The opportunities for Android app developers are enormous.


This book presents leading-edge computing technologies for professional software developers. At the heart of the book is the Deitel “app-driven approach”–concepts are presented in the context of complete working Android apps, rather than using code snippets. The introduction and app test drives at the beginning of each chapter show one or more sample executions. The book’s source code is available at


The apps in this book were carefully designed to introduce you to key Android features and APIs. You’ll quickly learn everything you need to start building Android apps–beginning with a testdrive of the Doodlz app in Chapter 1, then building your first app in Chapter 2. By the time you reach Chapter 9, you’ll be ready to create your own apps for submission to Google Play and other app marketplaces. You’ll master the Google Play submission process, including uploading your apps, deciding whether to sell your apps or offer them for free, and marketing them using in-app advertising, social media, Internet public relations and more.


Practical, example-rich coverage of:

  • Android 4.3 and 4.4
  • Android Development Tools, Android Studio
  • Supporting Various Screen Sizes/Resolutions
  • Accessibility, Internationalization, Graphics
  • Activities, Fragments, Intents, Preferences
  • GUIs, Layouts, Menus, Resource Files, Lists, Adapters, Events, Touch/Gesture Processing
  • Immersive Mode, Printing Framework, PrintHelper
  • Assets (Images, Audio), View Animation
  • Threading, Collections, SQLite Database
  • Social sharing via implicit intents
  • Google Play™, App Publishing, Pricing, Monetization, Marketing, In-App Advertising, In-App Billing and more.



  • Download code examples
  • For information on Deitel’s Dive Into® Series programming training courses delivered at organizations worldwide visit or write to
  • Join the Deitel social networking communities on Facebook® at, Twitter® @deitel, Google+ at, LinkedIn® at, YouTube at and subscribe to the Deitel® Buzz Online e-mail newsletter at subscribe.html


The Deitel® Developer Series is designed for professional programmers. The series presents focused treatments on a growing list of emerging and mature technologies, including Android™ app development, iOS® app development, Java, C# and .NET, C++, C, JavaScript®, Internet and web development and more. Each book in the series contains the same live-code teaching methodology used in the Deitels’ How to Program Series college textbooks–most concepts are presented in the context of completely coded, working apps.


Deitel & Associates is an internationally recognized authoring and corporate training organization specializing in Android and iOS® app development, programming languages, object technology and Internet and web software technology. The company offers instructor-led courses delivered at client sites worldwide on programming languages and platforms, such as Android™ app development, iOS® app development, Java, Objective-C, C#, Visual Basic®, Visual C++®, C++, C, XML, Python, Perl®, object technology, Internet and web programming, and a growing list of additional programming and software-development courses. The founders of Deitel & Associates, Inc., are Paul Deitel and Dr. Harvey Deitel. The company’s training clients include many of the world’s largest corporations, government agencies, branches of the military and academic institutions. To learn more about Deitel & Associates, Inc., its professional books, college textbooks, e-books and LiveLessons video training, and its worldwide Dive-Into® Series instructor-led, on-site training curriculum, visit or send an email to Join the Deitel social media communities on Facebook® (, Twitter® (@deitel), Google+ (, LinkedIn® ( and YouTube (, and subscribe to the Deitel® Buzz Online newsletter (



專業程式設計師的Deitel指南:使用Android 4.3和4.4、基於Eclipse的Android開發工具和新的Android Studio進行智慧型手機和平板電腦應用程式開發。

Google Play已經下載了數十億個應用程式!本書將為您提供一切開發出優秀Android應用程式所需的工具,並將它們發佈到Google Play。本書採用以應用程式為導向的方法,每個新技術都在七個經過完整測試的Android應用程式的背景下進行討論,包括語法著色、代碼突出顯示、代碼步驟和樣本輸出。您將開發的應用程式包括:

- 歡迎應用程式
- 大砲遊戲
- 小費計算器
- Doodlz
- Twitter搜尋
- 通訊錄
- 國旗測驗

第一代Android手機於2008年10月發布。根據Strategy Analytics的報告,到2013年10月,Android在全球智慧型手機市場份額中佔81.3%,蘋果佔13.4%,微軟佔4.1%,黑莓佔1%。從Google Play已經下載了數十億個應用程式。現在全球已有超過十億部Android設備啟用,每天啟用超過150萬部Android設備。Android應用程式開發者的機會是巨大的。


本書中的應用程式精心設計,以介紹關鍵的Android功能和API。您將迅速學習開始建立Android應用程式所需的一切知識,從第1章中Doodlz應用程式的測試開始,然後在第2章中建立您的第一個應用程式。到達第9章時,您將準備好為Google Play和其他應用程式市場創建自己的應用程式。您將掌握Google Play的提交流程,包括上傳應用程式、決定是否出售應用程式或免費提供應用程式,以及使用應用程式內廣告、社交媒體、網絡公關等進行營銷。


- Android 4.3和4.4
- Android開發工具、Android Studio
- 支援各種螢幕尺寸/解析度
- 可訪問性、國際化、圖形
- 活動、片段、意圖、偏好設定
- GUI、佈局、選單、資源檔、列表、適配器、事件、觸控/手勢處理
- 沉浸模式、列印框架、PrintHelper
- 資產(圖片、音頻)、視圖動畫
- 多線程、集合、SQLite資料庫
- 通過隱式意圖進行社交分享
- Google Play、應用程式發佈、定價、盈利、營銷、應用程式內廣告、應用程式內購買等。


- 下載程式碼範例
- 了解Deitel在全球組織中提供的Dive Into系列程式設計培訓課程,請訪問或寫信至
- 加入Deitel社交網絡