没有合适的资源?快使用搜索试试~ 我知道了~
Android Recipes - A Problem-Solution Approach
4星 · 超过85%的资源 需积分: 10 17 下载量 43 浏览量
2012-03-06
21:37:14
上传
评论
收藏 5.4MB PDF 举报
温馨提示
试读
451页
Android Recipes: A Problem-Solution Approach guides you step-by-step through a wide range of useful topics using complete and real-world working code examples.
资源推荐
资源详情
资源评论
CHAPTER 9: Super Jumper: A 2D OpenGL ES Game
488
T
he real-world code examples found in Android Recipes: A Problem-Solution
Approach take the time and stress out of developing top-notch apps for this
leading mobile OS platform. When you start a new project, just copy and paste
the code and configuration files from the book, then tailor to your need.
Using complete and tested code examples, Android Recipes features a host of
solutions to practical problems. Study it chapter by chapter, or dip into its more
than 80 down-to-earth recipes to find the exact solution you need as you need it.
Android Recipes teaches you how to build an app with Google’s Android SDK at
the command line or the graphical Eclipse IDE. From there, you’ll rapidly master
the user interface, cloud communications, device hardware, data persistence,
inter-app communications, and interaction with Android itself.
What you’ll learn
•
Android architecture and various Android-specific APIs
•
How to develop a Units Converter app in the context of command-line/
Android SDK and Eclipse/Android SDK environments
•
How to accomplish various tasks related to the user interface and more
•
How to use external libraries to save time and effort
•
How to quickly develop an app using the Scripting Layer 4 Android tool
•
How to boost app performance by using the Android NDK
•
Guidelines for filtered, performant, responsive, seamless apps
From insightful instruction to helpful examples, Android Recipes is your guide to
writing cool, popular apps for one of today’s hottest mobile platforms.
Android Recipes
A Problem-Solution Approach
Dave Smith | Jeff Friesen
Your reference guide for rapidly understanding Android
and rapidly developing Android apps
Companion
eBook
Available
Smith
Friesen
Android Recipes
T
he real-world code examples found in Android Recipes: A Problem-Solution
Approach take the time and stress out of developing top-notch apps for this
leading mobile OS platform. When you start a new project, just copy and paste
the code and configuration files from the book, then tailor to your need.
Using complete and tested code examples, Android Recipes features a host of
solutions to practical problems. Study it chapter by chapter, or dip into its more
than 80 down-to-earth recipes to find the exact solution you need as you need it.
Android Recipes teaches you how to build an app with Google’s Android SDK at
the command line or the graphical Eclipse IDE. From there, you’ll rapidly master
the user interface, cloud communications, device hardware, data persistence,
inter-app communications, and interaction with Android itself.
What you’ll learn
•
Android architecture and various Android-specific APIs
•
How to develop a Units Converter app in the context of command-line/
Android SDK and Eclipse/Android SDK environments
•
How to accomplish various tasks related to the user interface and more
•
How to use external libraries to save time and effort
•
How to quickly develop an app using the Scripting Layer 4 Android tool
•
How to boost app performance by using the Android NDK
•
Guidelines for filtered, performant, responsive, seamless apps
From insightful instruction to helpful examples, Android Recipes is your guide to
writing cool, popular apps for one of today’s hottest mobile platforms.
Android Recipes
A Problem-Solution Approach
Dave Smith | Jeff Friesen
Your reference guide for rapidly understanding Android
and rapidly developing Android apps
Companion
eBook
Available
Smith
Friesen
Android Recipes
CHAPTER
9: Super Jumper: A 2D OpenGL ES Game
488
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
iii
Contents at a Glance
Contents ............................................................................................................. iv
Foreword ......................................................................................................... viii
About the Authors .............................................................................................. ix
About the Technical Reviewer ............................................................................ x
Acknowledgments ............................................................................................. xi
Preface ............................................................................................................. xii
■Chapter 1: Getting Started with Android ......................................................... 1
■Chapter 2: User Interface Recipes ................................................................. 75
■Chapter 3: Communications and Networking .............................................. 155
■Chapter 4: Interacting with Device Hardware and Media ........................... 201
■Chapter 5: Persisting Data .......................................................................... 257
■Chapter 6: Interacting with the System ...................................................... 309
■Chapter 7: Working with Libraries .............................................................. 353
■Appendix A: Scripting Layer for Android ..................................................... 385
■Appendix B: Android NDK ............................................................................ 397
■Appendix C: App Design Guidelines ............................................................. 411
Index ............................................................................................................... 419
1
1
Chapter
Getting Started with
Android
Android is hot, and many people are developing Android applications (apps for short).
Perhaps you would also like to develop apps, but are unsure about how to get started.
Although you could study Google’s online Android Developer’s Guide
(http://developer.android.com/guide/index.html) to acquire the needed knowledge,
you might be overwhelmed by the vast amount of information that this guide presents. In
contrast, this chapter provides just enough theory to help you understand the basics of
Android. This theory is followed by several recipes that teach you how to develop apps
and prepare them for publication to Google’s Android Market.
What Is Android?
The Android Developer’s Guide defines Android as a software stack – a set of software
subsystems needed to deliver a fully functional solution – for mobile devices. This stack
includes an operating system (a modified version of the Linux kernel), middleware
(software that connects the low-level operating system to high-level apps) that’s partly
based on Java, and key apps (written in Java) such as a web browser (known as
Browser) and a contact manager (known as Contacts).
Android offers the following features:
Application framework enabling reuse and replacement of app
components (discussed later in this chapter)
Bluetooth, EDGE, 3G, and WiFi support (hardware dependent)
Camera, GPS, compass, and accelerometer support (hardware
dependent)
Dalvik Virtual Machine (DVM) optimized for mobile devices
GSM Telephony support (hardware dependent)
1
CHAPTER 1: Getting Started with Android
2
Integrated browser based on the open source WebKit engine
Media support for common audio, video, and still image formats
(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
Optimized graphics powered by a custom 2D graphics library; 3D
graphics based on the OpenGL ES 1.0 specification (hardware
acceleration optional)
SQLite for structured data storage
Although not part of an Android device’s software stack, Android’s rich development
environment (including a device emulator and a plugin for the Eclipse IDE) could also be
considered an Android feature.
History of Android
Contrary to what you might expect, Android did not originate with Google. Instead,
Android was initially developed by Android, Inc., a small Palo Alto, California-based
startup company. Google bought this company in July 2005 and released a preview
version of the Android SDK in November 2007.
In mid-August, 2008, Google released the Android 0.9 SDK beta, and subsequently
released the Android 1.0 SDK one month later. Table 1–1 outlines subsequent SDK
update releases. (Starting with version 1.5, each major release comes under a code
name that’s based on a dessert item.)
Table 1–1. Android Update Releases
SDK Update Release Date and Changes
1.1 Google released SDK 1.1 on February 9, 2009. Changes included paid apps
(via Android Market) and “search by voice” support.
1.5 (Cupcake)
Based on Linux
Kernel 2.6.27
Google released SDK 1.5 on April 30, 2009. Changes included the ability to
record and watch videos through camcorder mode, the ability to upload
videos to YouTube and pictures to Picasa, the ability to populate the home
screen with widgets, and animated screen transitions.
1.6 (Donut)
Based on Linux
Kernel 2.6.29
Google released SDK 1.6 on September 15, 2009. Changes included an
improved Android Market experience, an integrated
camera/camcorder/gallery interface, updated “search by voice” with speed
and other improvements, and an updated search experience.
2.0/2.1 (Eclair)
Based on Linux
Kernel 2.6.29
Google released SDK 2.0 on October 26, 2009. Changes included a
revamped user interface, a new contacts list, support for Microsoft
Exchange, digital zoom, improved Google Maps (version 3.1.2), HTML5
support for the Browser app, live wallpapers, and Bluetooth 2.1 support.
Google subsequently released SDK update 2.0.1 on December 3, 2009, and
SDK update 2.1 on January 12, 2010.
剩余450页未读,继续阅读
资源评论
- qq_171078932014-07-30a good book for solving problems encountered in writing code
小冰渣儿
- 粉丝: 1
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功