More Google Android Samples On GitHub
Written by Lucy Black   
Tuesday, 28 April 2015

New Android code samples covering Android Wear, Android for Work, NFC and Screen capturing have been made available on GitHub. The Santa Tracker Android app is also now available there.

The Google Samples repository already contains dozens of samples that you can use in your own apps or to discover how Android features work. You can access samples from Android Studio using its built-in Import Samples feature, which is the recommended method or download them in the Android SDK Manager.


The five new samples, added last week are:

  • XYZTouristAttractions - Provides a practical example of how a mobile app would interact and communicate with its Wear counterpart. The app is a tourist attractions experience that notifies the user when they are in close proximity to notable points of interest. In parallel,the Wear component shows tourist attraction images and summary information, and provides quick actions for nearby tourist attractions in a GridViewPager UI component.

  • DeviceOwner - A Device Owner is a specialized type of device administrator that can control device security and configuration. This sample uses the DevicePolicyManager to demonstrate how to use device owner features, including configuring global settings (e.g.automatic time and time-zone) and setting the default launcher.

  • NfcProvisioning - Demonstrates how to use NFC to provision a device with a device owner. It sets up the peer device with the DeviceOwner sample by default. You can rewrite the configuration to use any other device owner.

  • NFC BeamLargeFiles - A demonstration of how to transfer large files via Android Beam on Android 4.1 and above. After the initial handshake over NFC, file transfer will take place over a secondary high-speed communication channel such as Bluetooth or WiFi Direct.

  • ScreenCapture - The MediaProjection API was added in Android Lollipop and allows you to easily capture screen contents and/or record system audio. This sample demonstrates how to use the API to capture device screen in real time and show it on a SurfaceView.

In addition Google has now open-sourced its Santa Tracker Android app, which includes three games, two Android Wear watchfaces and hidden Easter Eggs and well as its parallax-scrolling village backdrop. For developers there is more to this Android App than you might imagine. To help with user engagement, the app uses the App Indexing API to enable autocomplete support for Santa Tracker games from Google Search. This is done using deep linking. In this video, Jarek Wilkiewicz demonstrates how the feature works in Santa Tracker, and explains how you can implement it in your own Android app.


So if you thought Santa Tracker was something only for a few days in December, it's time to see it in a different light.


More Information

New Android Code Samples

Google Samples repository

Ho Ho Ho! Google's Santa Tracker is now open source

Santa Tracker on Github

Related Articles

Google Opens Chromecast To Devs

Santa Trackers from Google and Microsoft 


To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.



Girls In Tech Has Closed

Girls in Tech, the nonprofit devoted to "the engagement, education, and empowerment of women in technology" has closed due to lack of funding, leaving behind a blank website. 

Udacity's iOS Nanodegree Completely Revamped

Udacity has refreshed its iOS Developer Nanodegree Program. The latest version, iOS Development with SwiftUI and SwiftData is intended to take 5 months.

More News


kotlin book



or email your comment to:



Last Updated ( Tuesday, 28 April 2015 )