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.

Google Maps Mashups 13

GIS Cloud

GIS Cloud is a powerful free cloud based GIS service, that allows users to create, edit, analyze and publish data from only one GIS service. When creating a map with GIS Cloud users can choose from a number of base tiles, including OpenStreetMap, Bing Maps and Google Maps. Users can then add GIS data to the map, either from data already hosted on GIS Cloud or from their own files. Because the application is web based GIS Cloud enables centralised access to projects. Teams can work together on a project, with each member having their own account. Any changes then made to a project are available immediately to every member of the team. GIS Cloud projects can be shared, either by sharing the GIS Cloud URL of the project or by embedding the map in your own website. GIS Cloud also comes with a REST API and a JavaScript API.

Street View Image API

Google has released a Street View Image API to quickly and easily add a static image to a web page. The API provides a simple method for adding a Street View image or thumbnail to any application without the need for JavaScript. The API simply constructs a URL for the required Street View, which you can add to a web page as you would any other image. The API returns the corresponding Street View panorama as an image in JPG format. A quick example is the Street View of the Eiffel Tower above, which I added to this post with the URL×200&location=48.852733, 2.303183&heading=315&fov=90&pitch=5&sensor=false The API should prove very useful in particular for real-estate, hotel and restaurant listing sites, providing a quick and easy method for providing images of houses, hotels and restaurants.

DVRPC Pedestrian and Bicycle Counts

The Delaware Valley Regional Planning Commission collects traffic volume counts at over 5,000 locations each year. The DVRPC Pedestrian and Bicycle Counts Google Map allows users to select and view pedestrian and bicycle counts taken within the Philadelphia region. The data for the map was collected by the DVRPC over a one week period with detailed hourly reports linked to each location. Using the map it is therefore possible to view bicycle and pedestrian traffic at different locations in the city for the year in which it was collected. If you select an individual map marker you can click through to read a detailed report of the pedestrian or bicycle count at that location, showing the data for every hour within a one week period. map

The U.S. Postal Service announced this week that it will be studying 251 mail processing facilities for consolidation. If all of these plants were to close, it would reduce the area mail processing network by over half, presumably at a huge cost to delivery times. The website Save the Post Offices has created a Google Map showing the location of the 251 mail processing facilities that may be closed down, Processing Facilities Under Study for Consolidation Map. Save the Post Offices has also created Google Maps to show the location of Post Offices Closed in 2011, 3,653 Post Offices Under Study for Closure under RAOI and 727 (non-RAOI) Post Offices Under Study for Discontinuance.

Obsidian Portal

Obsidian Portal is an online platform for running and organizing table top role-playing games. Using the platform gamers can can build campaigns and find other RPG gamers. The platform also includes an option to easily create a Google Map of your campaign world. Users can create campaign maps from any JPEG image. The map can include map markers to show the position of cities or other important locations in a campaign. The map markers can also include links to a users Wiki page for the mapped location.

Digital Typhoon – Track Forecast Map

Agora’s Digital Typhoon – Track Forecast Map tracks tropical cyclones in and around Japan. The map shows the historical tracks of current typhoons and also shows their predicted path.

The map is currently showing the paths of typhoon Roke and Sonca. When the map first loads an animation of the typhoons’ path is displayed on the map. Different coloured markers indicate the typhoon’s wind speed at different points along its path.

The numbered red map markers show the predicted path of a typhoon. Each marker includes a radial polyline showing the probability circle of the typhoon’s location. You can also click on the markers to view the predicted wind speed.

Submarine Cable Map

TeleGeography’s Submarine Cable Map is a real thing of beauty.

The map depicts 188 active and planned submarine cable systems and their landing stations around the world. Both the cables and their landing points on the map are interactive. Clicking a cable provides access to data about the cable, including the cable’s name, ready-for-service (RFS) date, length, owners, website, and landing points. Clicking a landing point reveals a list of all submarine cables landing at that station.

The map makes great use of Google Map styles and custom info windows to create a map that is both functional and great to look at., the real-time plane tracking website, has made some very impressive updates to their Google Map.

Now as well as tracking thousands of planes in real-time around the world you can also play back a whole day’s worth of flights. The playback option allows you to select a date, the number of hours you wish to view and even the speed of the animation. You really should zoom out on the USA, set the time to 23 hours and the speed to 120x and watch a day’s worth of flights.

Another nice update in this new release of is the custom information windows. If you select an individual plane you can view a picture of the plane, the flight and flight details, download a KML of the flight path, zoom the map to fit the entire flight path and share the track on Twitter and Facebook.

Google Map of Speed Traps is a new Google Map, and Android & iPhone app which has a huge database of speed traps around the world. is the latest application from the ever impressive Ubilabs. The app allows you to view the location of speed traps in your region and around the world. More than 2,000 mobile speed traps are reported by the community per day.

The application allows users to search by location and filter results by fixed speed traps, mobile cameras and all speed traps. The speed trap markers include speed limits where available. Users of the map and the mobile apps can also add speed traps that are missing from the map.


Google Environment: Integrated Mobile Apps


The Google Apps Marketplace is a storefront for Google Apps customers to discover, purchase, deploy and manage web applications which are integrated with Google Apps. These applications are typically used from desktops and laptops, but many vendors on the Apps Marketplace have also optimized the experience for their users who are on-the-go. There are several different strategies for enabling a mobile workforce, and each requires a different approach to authentication and authorization.

Lightweight: Synchronize Contacts, Calendars and Docs with Google Apps

Google has written applications and synchronization clients to help ensure that the core Google Apps data is available to users on their mobile devices, whether they’re on their mobile phones or tablets. By storing contacts, dates and documents from your application in Google Apps using the application APIs, you can leverage these features to provide a mobile view for your users.

Since you’re only accessing the application APIs on your web application’s server, and the user has already linked up their mobile device to their Google account, there are no special techniques for authentication and authorization when using this lightweight approach.

Standards-based: Build a mobile-optimized web application

With the latest advances in HTML5 web technologies such as offline and local storage, it’s possible to build mobile interfaces for business apps which are full-featured and accessible to users on many devices. The primary goal in building the mobile web application is to optimize the user experience for different input devices, form factors and limitations in network availability and bandwidth.

Because the application is in a web browser, most of the changes to implement are in the frontend– HTML, JavaScript and CSS. User authentication and data authorization continue to use the same OpenID and OAuth technologies as are used for the desktop/laptop version of the application.

Device-custom: Build native companion apps for mobile devices

Does your application need access to hardware-specific APIs which are not available in a web browser, or do you feel a great user experience can only be achieved using native code? Several Apps Marketplace vendors have built native applications for popular mobile platforms like Android and iOS. Although it takes considerably more effort to build multiple native applications to cover the major platforms, these vendors can also take advantage of the additional distribution channels offered by mobile stores.

Authentication and authorization are often challenging for developers building native mobile applications because they cannot simply ask users for a password if their app supports single-sign on to Google with OpenID. We recently published an article describing a technique using an embedded webview for accomplishing OpenID authentication in mobile apps. This article includes references to sample code for Android and iOS.

Many Project Management applications, like Manymoon, store important dates on Google Calendar. These dates are then available on mobile devices.

GQueues has a HTML5 mobile app. Their founder has written about why they used this technique.

Native applications, such as the OpenID Sample Store displayed, can use an embedded webview to authenticate users.