BT

Your opinion matters! Please fill in the InfoQ Survey!

Google Play Services 2.0 Adds Maps and Photo Sphere API

| by Abel Avram Follow 4 Followers on Dec 06, 2012. Estimated reading time: 2 minutes |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

Google has released version 2.0 of their Play Services for Android applications. The new additions represent the Maps and Photo Sphere APIs, and are available for all applications running on Android 2.2+.

The Maps API enables developers to integrate almost the entire Google Maps for Android functionality into their mobile applications, including connecting to the Google Maps Service, downloading and displaying tiles, pan and zoom controls and gestures, with two exceptions: map tiles do not contain personalized content such as personalized smart icons and not all icons on the map are clickable.

The new API introduces support for map fragments which is a subclass of Android Fragment, representing a behavior or a portion of the UI in an activity. One can combine multiple map fragments to create a multi-pane UI or reuse a fragment in multiple activities. Adding a fragment to an activity can be done in XML or in code, the former being shown below:

<fragment
  android:id="@+id/map"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  class="com.google.android.gms.maps.MapFragment" />

The other API made available is Photo Sphere also called panorama. This kind of 360o pictures was recently introduced in Android 4.2, resembling Street View images available in Maps, and it comes with an open format, according to a Google post:

We’ve made Photo Sphere an open format so anyone can create and view them on the web or on mobile devices.

A Photo sphere is simply an image file (like a JPG) that has in it text-based metadata, an open format created by Adobe called XMP. The metadata describes the Photo Sphere’s dimensions and how it should be rendered within the interactive Photo Sphere viewer you see in Android, Google+, and Google Maps.

But perhaps one of the most useful features of Play Services is being supported for Android 2.2+ and their upgrade is done via Play store. Tim Bray explains:

The world hasn’t figured out how big a deal Play services is; one of the highest-impact changes in Android’s history.

Historically, big new features in Android required Framework revisions, which require major releases with updates right down into the Linux kernel, which only ship twice a year, and which aren’t reliably made available on older devices.

Play services allows the Android group to ship major new features (OAuth 2.0, Mapping, and Photo Sphere so far) in a way that is auto-refreshed on all compatible devices back to 2.2 “Froyo”. That’s a lot of devices. That’s a lot higher impact than all the new magic that rolls out any one major OS upgrade.

Play Services also provides OAuth 2.0 authentication support and integration with Google+, including sign-in, sharing and +1 on G+.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Not available on the emulator by Alex Helder

Unfortunately, the Play Services 2.0 Maps API can only be used on devices that have Google Play; this means that developers can not use the emulator to test!

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT