A collection of Xamarin.Android sample projects.
C# C HTML GLSL Shell Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github Added issue template Oct 11, 2017
AIDLDemo [AIDLDemo] Add AndroidManifest.xml Jun 20, 2014
AccelerometerPlay Add brief description tag to metadata.xml Apr 16, 2015
AccessoryViews Add brief description tag to metadata.xml Apr 16, 2015
ActionBarPullToRefresh Sample updates for 5.0 up to MonoIO Sep 29, 2014
ActionBarSherlock [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
ActionBarViewPager [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
ActivityLifecycle Start and Final solutions for ActivityLifecycle topic. Sep 4, 2015
AdvancedAppLifecycleDemos Add brief description tag to metadata.xml Apr 16, 2015
AdvancedImmersiveMode [AdvancedImmersiveMode] Use Android.App over Android.Support.V4.App Jun 9, 2015
AnalyticsV2 fix project type guids (remove Xamarin.Android type guid from binding… Jan 17, 2017
AndroidBeamDemo Compile for different Architectures Mar 2, 2017
AndroidMapViewBalloons Update samples to compatible target framework Sep 30, 2014
AnimationDemo Move AnimationsDemo out of docs repo. Sep 18, 2015
ApiDemo [ApiDemo] Bump min version to 10 Jun 22, 2017
AppRestrictions [AppRestrictions] Fix OnClick listener registration May 25, 2018
ApplicationFundamentals [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
AsyncImageAndroid Shorten brief descriptions Apr 23, 2015
BasicImmersiveMode [BasicImmersiveMode] Use Android.App over Android.Support.V4.App Jun 9, 2015
BasicMediaRouter Add android sample 'BasicMediaRouter' Aug 15, 2013
BasicTableAdapter Add brief description tag to metadata.xml Apr 16, 2015
BasicTableAndroid Add brief description tag to metadata.xml Apr 16, 2015
BatchStepSensor [BatchStepSensor] Clean up and modify to work with new CommonSampleLi… Jun 9, 2015
BluetoothChat Update target API to Android 8.1. Update NuGets. Mar 9, 2018
BluetoothLeGatt Fix up the bluetooth chat sample so that it works. Mar 6, 2018
BorderlessButtons Add brief description tag to metadata.xml Apr 16, 2015
BouncingGameCompleteAndroid [BouncingGame] Consolidate CocosSharp NuGet package versions May 22, 2018
BouncingGameEmptyAndroid [BouncingGame] Consolidate CocosSharp NuGet package versions May 22, 2018
BuiltInViews Add brief description tag to metadata.xml Apr 16, 2015
Button Add brief description tag to metadata.xml Apr 16, 2015
CalendarDemo Remove extra calendar setting from CalendarDemo Apr 26, 2017
CameraAppDemo Update samples to compatible target framework Sep 30, 2014
CardEmulation [Card Emulation/Reader] Clean up sample and add compatibility for Com… Jun 9, 2015
CardReader [Card Emulation/Reader] Clean up sample and add compatibility for Com… Jun 9, 2015
CocosSharpEntities Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
CommonSampleLibrary Fix up the bluetooth chat sample so that it works. Mar 6, 2018
ContactManager Add brief description tag to metadata.xml Apr 16, 2015
Contactables [Contactables] Fix InvalidCastException Apr 14, 2015
ContactsProviderDemo Update ContactsProviderDemo to use CursorLoader Mar 22, 2018
ContentControls removed duplicate samples Feb 12, 2013
ContentProvider Add brief description tag to metadata.xml Apr 16, 2015
CursorTableAdapter Add brief description tag to metadata.xml Apr 16, 2015
CustomChoiceList Fix for case sensitive filesystem. Feb 17, 2014
CustomRowView Add brief description tag to metadata.xml Apr 16, 2015
CustomTransitions [CustomTransitions] Clean up and add compatibility for CommonSampleLi… Jun 9, 2015
DoneBar Add new android sample 'DoneBar' Aug 9, 2013
DynamicTest Add brief description tag to metadata.xml Apr 16, 2015
Example_WorkingWithAudio Update working with audio sample to no longer use deprecated method Feb 12, 2016
ExportAttribute Add brief description tag to metadata.xml Apr 16, 2015
Facebook [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
FastScroll Add brief description tag to metadata.xml Apr 16, 2015
FilePickerExample [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
FingerprintGuide Merge pull request #263 from MihaMarkic/fix_fingerprint_crash Apr 11, 2018
Firebase/FCMNotifications [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
FragmentTransition [FragmentTransition] Fix for #41354 May 27, 2016
FragmentsWalkthrough [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
FrameAnimation Add brief description tag to metadata.xml Apr 16, 2015
FusedLocationProvider [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
GLCube-1.0 Add brief description tag to metadata.xml Apr 16, 2015
GLCube Add brief description tag to metadata.xml Apr 16, 2015
GLDiagnostics-1.0 Add brief description tag to metadata.xml Apr 16, 2015
GLDiagnostics Add brief description tag to metadata.xml Apr 16, 2015
GLDiagnostics30 Add brief description tag to metadata.xml Apr 16, 2015
GLNativeES20 Update samples to compatible target framework Sep 30, 2014
GLNativeES30 [GLNativeES30] Cleanly fails on unsupported HW Jul 1, 2014
GLSharedContext20 Added missing files for GLSharedContext20 Jul 22, 2014
GLTriangle20-1.0 Add brief description tag to metadata.xml Apr 16, 2015
GLTriangle20 Add brief description tag to metadata.xml Apr 16, 2015
GLTriangle30 Add brief description tag to metadata.xml Apr 16, 2015
GestureBuilder Dialog menu added instead of context menu. Mar 13, 2018
GetMobileNetworkStrength Adding some code comments/code formatting. Nov 25, 2013
GooglePlayServices [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
GraphicsAndAnimation Bump Support and GPS packages to 22/26 Oct 1, 2015
GridLayoutDemo Add brief description tag to metadata.xml Apr 16, 2015
HelloM4A Add brief description tag to metadata.xml Apr 16, 2015
HelloMultiScreen Add brief description tag to metadata.xml Apr 16, 2015
HelloTabsICS Add brief description tag to metadata.xml Apr 16, 2015
HelloWorld [HelloWorld] Update for most recent lint checks Jul 12, 2016
HelloWorldPublishing Move sample out of docs repo. Dec 11, 2015
HoneycombGallery Shorten brief descriptions Apr 23, 2015
HowsMyTls [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
ImageEffects [imageEffects]Android Version fix Aug 1, 2014
JNIDemo Update samples to compatible target framework Sep 30, 2014
JavaIntegration [aar] move resource from docs Dec 6, 2017
JetBoy Add brief description tag to metadata.xml Apr 16, 2015
JniDemo Add brief description tag to metadata.xml Apr 16, 2015
KitKat Add brief description tag to metadata.xml Apr 16, 2015
LabelledSections Shorten brief descriptions Apr 23, 2015
LeaderboardsAndAchievementsDemo [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
LifecycleDemo [LifeCycleDemo] Fix for # 37326 Feb 26, 2016
LiveWallpaperDemo Add brief description tag to metadata.xml Apr 16, 2015
LoadingLargeBitmaps Shorten brief descriptions Apr 23, 2015
LocalFiles Update samples to compatible target framework Sep 30, 2014
LocalNotifications [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
Location Update location services samples to match the updated guides. Feb 7, 2018
ManagedAndroidResourceTest Update samples to compatible target framework Sep 30, 2014
MapsAndLocationDemo_v3 [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
ModelAndVerts Add brief description tag to metadata.xml Apr 16, 2015
ModelDrawing Add brief description tag to metadata.xml Apr 16, 2015
MonoGame3DCamera Add brief description tag to metadata.xml Apr 16, 2015
MonoIO [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
MultiResolution Shorten brief descriptions Apr 23, 2015
NfcSample Revert "Set TargetFrameworkVersion to 2.3.3." Sep 19, 2013
NineOldAndroids Update sample references up to ViewPagerIndicator Sep 29, 2014
NotePad-Mono.Data.Sqlite [Notepad-Sqlite] Add manifest, set target framework version Apr 12, 2018
NotePad Fixed empty entry creation (#199) Sep 21, 2017
OneABIPerAPK Bump a few projects min SDK version to 9 Jan 26, 2018
OsmDroidBindingExample Add brief description tag to metadata.xml Apr 16, 2015
Phoneword [phoneword] move resource from docs Dec 6, 2017
PhonewordMultiscreen Target Android 8.0. Oct 10, 2017
PlatformFeatures Add metadata to systemuivisility demo. Feb 12, 2016
PopupMenuDemo Add brief description tag to metadata.xml Apr 16, 2015
RemoteNotifications [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
RotationDemo Add brief description tag to metadata.xml Apr 16, 2015
SanAngeles_NDK [SanAngeles] fix for # 9645 Jun 9, 2016
SanityTests Shorten brief descriptions Apr 23, 2015
SearchableDictionary [SearchableDictionary] fix for #28906 Jun 15, 2016
SectionIndex Add brief description tag to metadata.xml Apr 16, 2015
ServiceSamples Remove the old Xamarin.Android service examples. Apr 17, 2017
ShareActionProviderDemo Add brief description tag to metadata.xml Apr 16, 2015
SierpinskiES31 fix shaders compilation on Adreno (Nexus 6P) Nov 20, 2015
SimpleCursorTableAdapter Add brief description tag to metadata.xml Apr 16, 2015
SimpleWidget Don't use string constants for class names. May 22, 2015
SkeletonApp Add brief description tag to metadata.xml Apr 16, 2015
SlidingMenu [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
Snake Add brief description tag to metadata.xml Apr 16, 2015
SplashScreen [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
StandardControls removed duplicate samples Feb 12, 2013
StorageClient [Storage Client/Provider] Clean up and add compatibility for CommonSa… Jun 9, 2015
StorageProvider [Storage Client/Provider] Clean up and add compatibility for CommonSa… Jun 9, 2015
Support4 [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
Supportv7 Add toolbar-icons.zip with extra xxxhdpi icons (used by doc). Mar 27, 2018
SvgAndroid Add brief description tag to metadata.xml Apr 16, 2015
SwipeToRefresh [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
SwitchDemo Add brief description tag to metadata.xml Apr 16, 2015
SystemUIVisibilityDemo Add brief description tag to metadata.xml Apr 16, 2015
TablesAndCellStyles removed duplicate samples Feb 12, 2013
TextSwitcher [TextSwitcher] Sample porting (#250) Dec 21, 2017
TextureViewDemo Add brief description tag to metadata.xml Apr 16, 2015
TexturedCube-1.0 Add brief description tag to metadata.xml Apr 16, 2015
TexturedCube Add brief description tag to metadata.xml Apr 16, 2015
TexturedCubeES30-1.0 updated to use methods with strongly typed enums Oct 29, 2015
UpdateUsersProfile Update screenshots and metadata for some Lollipop samples. Oct 26, 2015
UrbanAirship [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
UserInterface [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
ViewPagerIndicator [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
ViewPagerIndicatorBinding [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
WalkingGameCompleteAndroid Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
WalkingGameEmptyAndroid Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
WeatherREST Update screenshots and metadata for some Lollipop samples. Oct 26, 2015
WebViewJavaScriptInterface Add brief description tag to metadata.xml Apr 16, 2015
android-m [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
android-n [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
android-o [AndroidCipher] Fix some NuGet hint paths, remove temp files Mar 12, 2018
android-support/ViewModel [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
android5.0 Use proper file name case so that the sample builds on Linux May 11, 2018
google-services [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
tv [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
wear [15.6] Updates and additions for API 27 and Xamarin.Android.Support 2… Mar 6, 2018
.gitignore Ignore a .vs folder Mar 6, 2018
README.md minor corrections in readme Mar 1, 2018
Xamarin.Edu.SampleGallery.Core.dll Update sample validator. Jul 5, 2012
build.sh pass arguments to xbuild so that we can easily run /t:Clean. Mar 11, 2013
install-hook.bat Added pre-commit hooks and the Xamarin code sample validator. Sep 21, 2011
install-hook.sh Set executable bit on install-hook.sh. Sep 27, 2011
pre-commit.posix Merge branch 'monodroid-4.1-preview' May 22, 2012
pre-commit.windows Merge branch 'monodroid-4.1-preview' May 22, 2012
samples.make Many more samples :-) Aug 16, 2010
validate.posix Merge branch 'monodroid-4.1-preview' May 22, 2012
validate.windows Fix order of options passed to `find` in scripts. Feb 17, 2012
xbuild.make Add support for ADB_TARGET specification. Feb 24, 2011
xcsv.exe Update sample validator. Jul 5, 2012

README.md

MonoDroid Samples

This repository contains Mono for Android samples, showing usage of various Android API wrappers from C#. Visit the Android Sample Gallery to download individual samples.

License

The Apache License 2.0 applies to all samples in this repository.

Copyright 2011 Xamarin Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributing

Before adding a sample to the repository, please run either install-hook.bat or install-hook.sh depending on whether you're on Windows or a POSIX system. This will install a Git hook that runs the Xamarin code sample validator before a commit, to ensure that all samples are good to go.

Samples Submission Guidelines

Galleries

We love samples! Application samples show off our platform and provide a great way for people to learn our stuff. And we even promote them as a first-class feature of the docs site. You can find the sample galleries here:

Sample GitHub Repositories

These sample galleries are populated by samples in these GitHub repos:

The mobile-samples repository is for samples that are cross-platform. The mac-ios-samples repository is for samples that are Mac/iOS only.

Sample Requirements

We welcome sample submissions, please start by creating an issue with your proposal.

Because the sample galleries are powered by the github sample repos, each sample needs to have the following things:

  • Screenshots - a folder called Screenshots that has at least one screen shot of the sample (preferably a screen shot for every page or every major functionality piece, people really key off these things). for the xplat samples, the folder should be split into platform folders, e.g. iOS, Android, Windows. see https://github.com/xamarin/mobile-samples/tree/master/Tasky/Screenshots for an example of this.

  • Readme - a README.md file that has the name of the sample, a description, and author attribution. sample here: https://github.com/xamarin/mobile-samples/blob/master/Tasky/README.md

  • Metadata - Finally, it needs a Metadata.xml file (https://github.com/xamarin/mobile-samples/blob/master/Tasky/Metadata.xml) that has some information:

    • ID - A GUID for the sample. You can generate this in MD under Tools menu : Insert GUID. we need this to key between articles and their associated samples

    • IsFullApplication - Boolean flag (true or false): whether or not this is a full application such as the MWC App, Tasky, etc., or it's just a feature sample, such as, how to use 'x' feature. the basic test here is, if you would submit this to the app store because it's useful, then it's a full app, otherwise it's just a feature sample.

    • Brief - Short description or what your sample does. This allows us to display a nice and clean vignette on the sample page.

    • Level - Beginning, Intermediate, or Advanced: this is the intended audience level for the sample. only the getting started samples are Beginning, as they are intended for people who are just starting with the platform. most samples are Intermediate, and a few, that dive deep into difficult APIs, should be Advanced.

    • Minimum License Requirement - Starter, Indie, Business, or Enterprise: denotes the license that a user has to have in order to build/run the sample.

    • Tags: a list of relevant tags for the app. These are:

    • Data

    • Games

    • Graphics (CoreDrawing, Animation, OpenGL...)

    • Media (Video, Sound, recording, photos)

    • Platform Features (Photo Library, Contacts, Calendars, etc.)

    • Device Features (NFC, Accelerometer, Compass, Magnemometer, Bluetooth, RFID)

    • Cloud (Web Services, Networking, etc.)

    • Backgrounding

    • Maps + Location

    • Binding + Interop (Projections)

    • Notifications

    • Touch

    • Getting Started

    • Async

    • FSharp

    • SupportedPlatforms: this is only for cross plat samples. It's a comma-separated list, and the valid values are iOS, Android, and Windows.

    • Gallery: This tag must contain a value of true if you want the sample to show up in the samples gallery on the developer portal.

  • Buildable Sln and CSProj file - the project must build and have the appropriate project scaffolding (solution + proj).

A good example of this stuff is here in the drawing sample: https://github.com/xamarin/monotouch-samples/tree/master/Drawing

For a cross-platform sample, please see: https://github.com/xamarin/mobile-samples/tree/master/Tasky

GitHub Integration

We integrate tightly with Git to make sure we always provide working samples to our customers. This is achieved through a pre-commit hook that runs before your commit goes through, as well as a post-receive hook on GitHub's end that notifies our samples gallery server when changes go through.

To you, as a sample committer, this means that before you push to the repos, you should run the "install-hook.bat" or "install-hook.sh" (depending on whether you're on Windows or OS X/Linux, respectively). These will install the Git pre-commit hook. Now, whenever you try to make a Git commit, all samples in the repo will be validated. If any sample fails to validate, the commit is aborted; otherwise, your commit goes through and you can go ahead and push.

This strict approach is put in place to ensure that the samples we present to our customers are always in a good state, and to ensure that all samples integrate correctly with the sample gallery (README.md, Metadata.xml, etc). Note that the master branch of each sample repo is what we present to our customers for our stable releases, so they must always Just Work.

Should you wish to invoke validation of samples manually, simply run "validate.windows" or "validate.posix" (again, Windows vs OS X/Linux, respectively). These must be run from a Bash shell (i.e. a terminal on OS X/Linux or the Git Bash terminal on Windows).

If you have any questions, don't hesitate to ask!