On The Insider: Movie Roles the Stars Turned Down
BNET Business Network:
BNET
TechRepublic
ZDNet

October 28th, 2009

What's new in Android 2.0? Part 2: Developer features

Posted by Ed Burnette @ 12:17 am

Categories: Android, General, Google, Programming, Web Browsers

Tags: Device, API, SDK, Android 2.0, Android 1.6, KeyEvent, Ed Burnette

There is no spoon

The first thing you’ll notice about the new Android 2.0 SDK is… that there is no Android 2.0 SDK. It’s called “SDK Tools, Revision 3″. Why? Because of all those versions mentioned before. The idea is that you’ll download the “SDK Tools” once, and then install “packages” for different Android Platforms you want to support. I recommend you install the 1.5, 1.6, and 2.0 modules as a bare minimum. Also, be sure to install the Google API module if you’re going to use Google Maps. Heck, just install everything. Twice.

And don’t try to update from your existing 1.6 SDK. I don’t care what Google says - start fresh. You’ll need a new version of the Android Eclipse plug-in too. That one you can upgrade.

Nine hundred ninety-nine bottles of pop on the wall…

There are a ton of new developer-oriented features and APIs in Android 2.0. “A ton” equals 999, if you just go by the API Differences Report. The following are the most important ones I feel you should know about:

  • MotionEvent can now report simultaneous-touch information for devices that support it. Up to three pointers can be tracked simultaneously. Why three?
  • KeyEvent has new key dispatching APIs, to help implement action-on-up and long press behavior, as well a new mechanism to cancel key presses (for virtual keys).
  • Google Gears is deprecated, and its functionality has been folded into the WebView class. For example, there are new APIs to get your GeoLocation or store data in a web database.
  • Bluetooth enhancements including peer-to-peer discovery (the android.bluetooth package).
  • Centralized account manager API, securely stores and accesses authentication tokens or passwords (the android.accounts package). The API can support asynchronous long-running network-based authentication methods.
  • New APIs for sync adapters to connect to any backend. You could use this to synchronize data with a company database or third party mail server. Authentication is provided by the centralized account manager.
  • New contacts APIs and reusable contact badges (for apps that interact with the user’s contact list).
  • New Service life-cycle APIs.
  • New APIs for retrieving memory usage statistics on other applications.
  • New APIs for setting the home screen’s wallpaper.
  • New constants that allow a window to wake up the screen when it is displayed and show the window even if the screen is locked. This allows applications to more cleanly implement things like alarm clocks that should wake the device.
  • New Intent APIs that broadcast the docking state of the device and allow applications to launch special activities when the device is placed in a desktop or car dock.

Continue reading: What’s new in Android 2.0 for developers >

Pages: 1 2 3 4

Ed BurnetteEd Burnette is a professional developer and author of several articles and books about computing including Hello, Android: Introducing Google's Mobile Development Platform, 2nd Edition. For disclosure of Ed's industry affiliations, click here or to view his full profile click here.

Email Ed Burnette

Subscribe to Dev Connection via Email alerts or RSS.

  • Talkback
  • Most Recent of 6 Talkback(s)
RE: What's new in Android 2.0? Part 2: Developer features
Thanks Ed. (Read the rest)
Posted by: os2baba Posted on: 10/30/09 You are currently: a Guest | | Terms of Use
APIs for sync adapters  os2baba | 10/28/09
Re: APIs for sync adapters  Ed BurnetteZDNet Moderator | 10/29/09
Develop for 2.0  No_Ax_to_Grind | 10/28/09
So when Windows 7 came out...  Ed BurnetteZDNet Moderator | 10/29/09
RE: What's new in Android 2.0? Part 2: Developer features  darndan | 10/29/09
RE: What's new in Android 2.0? Part 2: Developer features  os2baba | 10/30/09

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement

Recent Entries

Premier Vendor Content Whitepapers, webcasts & resources from our Power Center Sponsors

Archives

Favorite Links

ZDNet Blogs

White Papers, Webcasts, and Downloads

SmartPlanet

  • Thought-provoking progressive ideas on diverse topics that intersect with technology, business, and life, and matter to the world at large. Visit SmartPlanet
  • More from IBM
  • Innovate your business' process model, play against the market, compete against others on our scoreboards and WIN! Try INNOV8 2.0: A BPM Simulator
  • Enabling Real-World Business Transformation through IBM Service Management Read the EMA Analyst Report
Click Here