Sharing Rich Content From Your Android Apps, to Google+ and Beyond

Many developers have been using Android’s share intent to help their users share content with others, directly from their apps. With the recently-launched ShareCompat library, you can now help your users share rich content with their friends (like images and videos) more easily, and the items they share include attribution to your app. All you need to do is add a few lines of code!

I’ll walk through a few examples that use Google+ as the application handler, but of course, these share intent improvements can work for any service. Popular apps like Foodspotting, Pulse News, and Shazam are already using ShareCompat to help users share rich content with their Google+ circles. You can check out this photo album to see how they are all taking advantage of the new library.

Creating the Share Intent

If you’d like users to be able to share text from your app, start by building the following intent:

Intent shareIntent = ShareCompat.IntentBuilder.from(ShareActivity.this)
   .setText("This site has lots of great information about Android!")


Here, I passed text and a URL to the setText method, and I used the setType method to identify the content as “text/plain.” The intent builder can then pass this information to the application that’s doing the sharing. Additionally, I used the setPackage method to specify the application that I want to handle it. In this case, the Google+ application is specified.

The Google+ share box with pre-populated text and link snippet.

Improved sharing via Google+

A few weeks ago Larry mentioned that we’d start shipping the Google part of Google+. The Android team then launched Ice Cream Sandwich, with a focus on improved sharing via Google+. And today we’re rolling out two more Google+ features that integrate with two more Google products: YouTube and Chrome.


It’s no secret that YouTube is filled with tons of great content (from inspiring speeches to music videos to honey badgers). We wanted to bring YouTube directly into Google+—as well as make it easier to watch and share your favorites—so we’re launching a YouTube “slider” in the stream. Here’s how it works:

  • Mouse over the new YouTube icon at the top right of Google+
  • It’ll slide out and ask, “What would you like to play”?
  • Enter whatever you’re in the mood for (like a topic or a musical artist)

Sharing YouTube videos with your circles also works (of course), but there’s a nice little twist: the people you share with can open a related playlist directly from your post! Last but not least, we’re starting to include YouTube playlists in Google+ search results.

YouTube video in the stream (left), YouTube playlist in Google+ search results (right)


We’re also rolling out two new Google+ Chrome extensions:

  • +1 button: +1 any webpage and share it with your circles
  • Notifications: check your Google+ notifications while you browse the web

Of course, if you don’t use Chrome, then you can use Google Toolbar for Internet Explorer. The new version—also rolling out today—includes these same sharing and notification features.

Google+ Chrome extensions: +1 button (left), notifications (right)

We’ve got lots more planned for Google+, YouTube and Chrome (and all the other Google products you already use). But we hope you enjoy today’s small taste of shipping the Google in Google+.

“Find My Friends” – The New iPhone App for Location Sharing


One of announcements from today’s Apple event was an interesting new app called Find My Friends.

The app lets you track the location of other users, but unlike Google’s Latitude, which is meant to be used with a wide circle of people you know, Apple’s app seems designed for use with a close circle of friends and family.

Apple’s examples of how the app can be used includes checking out if your son made it to school today.

Of course, not everyone wants to be tracked all the time, so Apple has included some privacy options, such as temporary location sharing. (For example, you can set up the app to share your location up until 7 p.m. each day.)

We can imagine a lot of parents will like the app, but a great deal of kids will probably hate it, or think of ways to circumvent this type of surveillance.