Android Samples

# Topeka for Android

A fun to play quiz that showcases material design on Android

Accelerometer Play

An example on the usage of the accelerometer to animate balls rolling on a wooden table.

Activity Recognition Sample

ActivityLifecycle Demos

Four sample projects that cover advanced activity and application lifecycle scenarios in Android.

ActivitySceneTransitionBasic

Demonstrates how to use Activity scene transitions when transitioning from one activity to another.

AdMobExample Sample

Advanced Immersive Mode

This sample demonstrates letting users show or hide the status bar and navigation bar with a swipe.

AgendaData Sample

Demonstrates sending calendar events from an Android handheld device to an Android Wear device.

AnalogClock

AnalogClock is a cross platform app displaying a classic clock.

Analytics Sample

Android API Demo

Includes a variety of small applications that illustrate the use of various Android APIs.

Android Beam Demo

Demonstrates new Android Beam (new NFC feature) in Ice Cream Sandwich.

Android Fit History Api Sample

Android Fit History Api Sessions Sample

Android Fit Recording Api Sessions Sample

Android Fit Sensors Api Sample

Android L Kitchen Sink

Demonstrates new Android L features including support v7.

Android L Notifications

Demonstrates how new features for notifications added in Android L are used.

Android Location Services Sample

This sample provides an example of gathering location data using the Android location system service.

App Indexing Sample

App Invite Sample

App Restriction Schema

Demonstrates using a profile owner to set app restrictions in Android.

AsyncAwait

Cross platform sample for iOS and Android showing image downloads using C# 5's async and await syntax.

AsyncImageAndroid

Demonstrates how to use the new Async/Await feature available in Xamarin.Android 4.8.

Background Location Demo

This is a cross platform sample, which demonstrates how to properly perform location updates while the application is either Active or Backgrounded.

Basic Location Sample

BatchStepSensor

This sample demonstrates how to set up and use Android 4.4's step counting APIs with batching.

Bluetooth Chat

Demonstrates using the Bluetooth APIs to create a sample chat client.

Bluetooth LE Explorer

This is a cross-platform app that demonstrates how to explore Bluetooth LE devices

Borderless Buttons

This sample demonstrates the **borderless button** styling from the Holo visual language.

BoxViewClock

A classic analog clock but realized entirely with BoxView.

BugSweeper

A familiar game with a new twist.

Button Widget

Shows how to use a simple button widget.

ButtonCode

This program demonstrates how to create a Button in code and process events from it.

ButtonXaml

Demonstrates how to create a Button in XAML and process its events in a code-behind file.

C# Dynamic Test

This sample demonstrates the use of dynamic types in DLR.

Calendar Demo

This example shows how to use the calendar API to list calendars and events.

Camera2 Basic Sample

Dmonstrates the basic use of the new Camera2 APIs.

Camera2Raw Sample

Demonstrates capturing RAW camera buffer using Camera2

Camera2Video

Demonstrates how record video on Android L using Android.Hardware.Camera2.

CardView

Demonstration of the CardView API introduced in Android L.

CCAction Demo

A simple project showing common and custom CCAction implementations.

CCDrawNode Gallery

A simple project showing all .

ClassHierarchy

Demonstrates a scrollable hierarchy of all Xamarin.Forms classes, structures, and enumerations.

ClippingBasic

This sample demonstrates simple clipping in Android L.

CocosSharp BouncingGame Project for iOS and Android

This is a small, complete game using CocosSharp for iOS and Android. It is the result of working through the the entire Introduction

Coin Time

A small, full Android and iOS platformer built on CocosSharp.

Contact Manager

This sample demonstrates how to interact with Android's contact manager.

ContactsProvider Demo

Demonstrates how to use ContactsProvider and the device owner's profile in Ice Cream Sandwich.

Content Controls

A cross platform sample which that demonstrates the usage of some common content controls.

Content Provider Demo

Demonstrates how a Content Provider can be implemented in Mono for Android.

Custom Transitions

Demonstrates how to create custom transitions to go from one scene in their app to the next.

DataLayer Sample

Demonstrates using the wearable APIs to send messages and stream data.

Delayed Confirmation

Demonstrates how to send and receive messages to a connected Wearable using the new Wear APIs.

DocumentCentricApps

This sample demonstrates the basic usage of the new Document-Centric Apps API.

DocumentCentricRelinquishIdentity

Demonstrates how to change the label of a document activity in recents using Document-Centric API.

Drawable Tinting

Demonstrates applying tinting and color filters to Drawables, programmatically and in XML.

Drawing Models in MonoGame

This is a small demo game using MonoGame for iOS and Android, using a shared code project. It is the result of working through the the

Drawing with Vertices in MonoGame

This is a small demo game using MonoGame for iOS and Android, using a shared code project. It is the result of working through the the

Drawing with Vertices in MonoGame

This is a small demo game using MonoGame for iOS and Android, using a shared code project. It is the result of working through the the

Elevation Basic

This sample demonstrates two alternative ways to move a view in the z-axis.

Elevation Drag

This sample demonstrates a drag and drop action on different shapes.

ElizaChat

Demonstrates how a personal assistant may work on a wearable device.

Embedded Resource

Demonstrates how to load a resource that has been built into the assembly.

Employee Directory

This is a Xamarin.Forms port of the pre-built sample app Employee Directory.

ExportAttributeTest

This is a functional test for "ExportAttribute" which is new in Mono for Android 4.2.

FindMyPhone

Demonstrates a way to create an app that allows you to use your wear device to find your phone.

Flashlight

Demonstrates how change the color of an android wear device's screen to a flat white color.

Floating Action Button Basic

This sample shows the two sizes of Floating Action Buttons and how to interact with them.

FormsGallery

This program displays all the views, cells, layouts, and pages available in Xamarin.Forms, one per page.

Fragment Transition

This sample demonstrates how to start a transition right after a fragment transaction.

FusedLocationProvider Sample

This sample provides an example of gathering location data using the FusedLocationProvider.

Geofencing Sample

Geofencing Wearable Sample

Demonstrates the use of geofencing with wearable devices.

GestureBuilder

This is a port of Android SDK sample "GestureBuilder" which is a showcase for android.gesture API.

GL Diagnostics

This sample tests all possible graphics configuration options and outputs valid ones.

GL Diagnostics

This sample tests all possible graphics configuration options and outputs valid ones.

GL Rotating Cube

This sample demonstrates simple drawing via OpenTK's GL APIs by drawing a rotating cube.

GL Textured Cube

Demonstrates a fractal rotating cube rendered with textures via OpenTK's GL APIs.

GL Textured Cube

This sample demonstrates a rotating cube rendered with textures via OpenTK's GL APIs.

GL Textured Cube

This sample demonstrates a rotating cube rendered with textures via OpenTK's GL APIs.

GL Triangle 30

OpenTK 3.0 version of GLTriangle.

Google Cloud Messaging Sample

Google IO 2011 App in Mono for Android

This is a port of the [Google IO 2011 Schedule App].

Google Play Services

Demonstrates a few uses of the maps API included within Google Play Services.

Google Sign-In Sample

GridLayout Demo

This example shows how to use a GridLayout with Ice Cream Sandwich.

GridLayoutDemo

This sample demonstrates how to display various UI elements in a grid.

GridViewPager sample

Demonstrates the use of GridViewPager and GridPagerAdapter for Android Wear.

Hello Mono for Android

A simple hello world application that displays a message in a TextView when a Button is pressed.

Hello Multiscreen

This is a simple example showing how to use activities to create multiscreen applications.

Hello World

Demonstrates the use of TextView to display a plain old hello world message via a string resource.

HelloSwipeViewWithTabs

Demonstrates how to use ViewPager and ActionBar together.

Honeycomb Gallery

Demonstrates new APIs in Honeycomb: fragments, ActionBar and the new animation framework.

How to build the entire package from source

Demonstrates interaction with the Facebook API.

ICS Tabs Demo

This example shows how to use tabs from the Action Bar in Ice Cream Sandwich.

Interpolator

This sample demonstrates the use of animation interpolators and path animations for Material Design.

Java Native Invoke Sample

Shows how to manually bind to a Java library so it can be consumed by a Mono for Android application.

Jet Boy

A simple game demonstrating usage of the JET audio engine.

Job Scheduler

This sample demonstrates the new JobScheduler API.

Jumping Jack

Demonstrates the use of the gravity sensor in the Android Wear device.

KitKat

This sample provides an overview of new features of Android 4.4 "KitKat".

Labelled Sections

Demonstrates how to create an alphabetically ordered list with labelled sections.

LabelledSections

This sample demonstrates how to create an alphabetically ordered list with labelled sections.

Live Wallpaper Demo

This sample demonstrates various forms of live wallpapers.

Loading Large Images

Demonstrates how to efficiently resample large images before displaying them.

Location Address Sample

Location Settings Sample

Location Updates Sample

Mono San Angeles sample port

This is a port of Android NDK sample (sanangeles).

MonoGame WalkingGame Project for iOS and Android

This is a small demo game using MonoGame for iOS and Android, using a shared code project. It is the result of working through the the

Multi-Resolution Graphics

Demonstrates how to display scalable/stretchable graphics using proper size units.

MultiTasking

A simple cross platform example of using a background thread to perform a long running task.

NavigationDrawer

This example illustrates a common usage of the DrawerLayout widget in the Android support library.

Nearby Connections Sample

Notepad Sample (Mono.Sqlite)

This sample shows a simple note taking application.

OSMDroid Bindings for Xamarin.Android

The sample code for the Java Binding walkthrough.

Phoneword

Demonstrates how to share C# code across iOS, Android, Windows Phone 7, Windows 8.

Phoneword

This sample demonstrates sharing C# code across platforms using Xamarin.Forms.

Phoneword Multiscreen

This sample demonstrates adding simple page navigation to the Phoneword app using Xamarin.Forms.

Popup Menu Demo

This example shows how to use a Popup Menu with Ice Cream Sandwich.

Quiz

Demonstrates how to create a quiz between the watch and the mobile device.

RecipeAssistant

Demonstrates sending a list of notifications pages to an Android Wear device, with each page describing a step in a recipe.

RecyclerView

Demonstrates use of RecyclerView with a LinearLayoutManager.

RecyclerViewer

Demonstrates the use of `CardView` and `RecyclerView` widgets introduced with Android 5.0.

Reveal Effect Basic

Basic sample to demonstrate the reveal effect.

Rotation Demo

This is the sample code for the article Handling Rotation.

Sanity Tests

SanityTests is a hodgepodge of things to test various API interactions.

ScaleAndRotate

Demonstrates how to scale and rotate Xamarin.Forms visual elements.

ScreenCapture

Demonstrates use of Media Projection API to capture device screen and show it on a SurfaceView.

Searchable Dictionary v2

Demonstrates the use of Android's search framework.

Service Samples

Example code from the **Creating Services** article.

ShareActionProvider Demo

This example shows how to use the ShareActionProvider to share an image using Ice Cream Sandwich.

Simple Widget

This sample shows a simple widget which fetches the word of the day from Wiktionary.

Skeleton App

This is a simple application with an EditText control and clear/back buttons, plus a custom picture.

SkeletonWear

Demonstrates the basic outline of a wearable project, including Gridviews on Wearable devices.

Snake

A plain old Snake game based on a TileView.

Solitaire Encryption (Xamarin.Forms)

Demonstrates the Solitaire encryption algorithm from Neal Stephenson's novel Cryptonomicon.

Standard Controls

This sample application illustrates how to use a number of standard ui controls.

Storage Client

Demonstrates how to let users choose a file via the system's file browser.

Storage Provider

Demonstrates how to manage documents and expose them to the Android system for sharing.

Support v7 Palette

Basic sample of custom theming your application with the Palette support library.

Support v7 Toolbar

Demonstrates replacing the ActionBar with the new Support v7 Toolbar

svg-android binding

A binding example for svg-android Java library.

Swipe to Refresh

Demonstrates how to implement the swipe to refresh pattern.

Switch Demo

This example shows how to use a switch control with Ice Cream Sandwich.

SynchronizedNotifications

Demonstrates using listener services to create three kinds of notifications.

System UI Visibility Demo

This example shows how to change the appearance of the Navigation Bar in Ice Cream Sandwich.

TabbedPageDemo

Demonstrates the TabbedPage, which allows easy navigation among similar pages.

Tables and Lists

Demonstrates the various table and cell styles available out of the box.

Tasky

Demonstrates a cross-platform todo application that allows you to track todo/task items.

Tasky Portable

This version of Tasky uses a Portable Class Library to encapsulate and share code across platforms.

Tasky Pro

Demonstrates proper application architecture layering and using a common code base.

TextureView Demo

Demonstrates how to use a TextureView with Ice Cream Sandwich.

Timer

Demonstrates a simple timer application designed for Wear.

TipCalc

Tip calculator is simple cross platform application, which calculates the correct tip amount.

TipCalc

Based on the existing iOS and Android sample, but completely rewritten for Xamarin.Forms.

Todo (Xamarin.Forms)

Demonstrates using either PCL or Shared Project templates.

TodoLocalized (Xamarin.Forms)

Demonstrates how to localize Xamarin.Forms using RESX.

Toolbar

Basic sample of replacing the ActionBar with the new ToolBar.

Touch

This sample illustrates how to work with touch in iOS. Specifically, it shows how to handle touch events, use pre-defined gesture

TvLeanback

This sample shows a basic Android-TV application by showcasing various video provided by Google.

ViewPagerIndicator

Port of [ViewPagerIndicator library by JakeWharton]

Visual Game Controller

Demonstrates the use of input from a game controller by displaying input events on the screen.

WatchViewStubSample

Demonstrates how to automatically select a layout for round or rectangular screens.

WeatherREST

Demonstrates how to call a RESTful service via HTTP and handle/parse the JSON results asynchronously.

WebView JavaScript Interface

This demonstrates C# - to - JavaScript interoperability in WebView (through Java interface).

Working With Audio – Test Application

Sample code to accompany the article Working With Audio.

Xamarin Forms Image Resizer

Demonstrates how to cross-platform load, resize, and display an image on the screen.

XAML Samples

A collection of samples that demonstrate how to utilize XAML with Xamarin.Forms.

Xuzzle

This sample implements the classic 14-15 puzzle using Xamarin.Forms.