没有合适的资源?快使用搜索试试~ 我知道了~
首页Android Recipes(Android小处方)
Android Recipes(中文名:Android小处方),本书以问答的形式,给出了常见的Android开发中最常见的问题和解决方案。 每个问题到包括:Problem,Resolution,How to work三个部分。 问题都十分经典,解决方案也很出色,开发者若能照着例子完成,开发技能必有很大提高。 适合Android 应用开发者,高清 pdf,方便阅读。
资源详情
资源评论
资源推荐

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页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论3