A collection of Xamarin.Android sample projects.
C# C HTML GLSL Shell Ruby
Latest commit fb9d4ed Aug 29, 2016 @pjcollins pjcollins committed on GitHub [Nougat] Use Custom Attributes over manifest declarations (#145)
* [MulitWindowPlayground] Initial updates for final API changes

* [DirectBoot] Use custom attributes over manifest declaration
Permalink
Failed to load latest commit information.
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
ActionBarViewPager Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Update samples to compatible target framework Sep 30, 2014
AndroidBeamDemo Add brief description tag to metadata.xml Apr 16, 2015
AndroidMapViewBalloons Update samples to compatible target framework Sep 30, 2014
AnimationDemo Move AnimationsDemo out of docs repo. Sep 18, 2015
ApiDemo Update all samples to delightful pictures from Miguel Feb 19, 2016
AppRestrictions Add new API-18 sample 'AppRestrictions' Aug 7, 2013
ApplicationFundamentals Update RotationDemo screenshots Oct 26, 2015
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 Add brief description tag to metadata.xml Apr 16, 2015
BluetoothLeGatt Fix XamBug 16819 due to enum parameter change Feb 25, 2014
BorderlessButtons Add brief description tag to metadata.xml Apr 16, 2015
BouncingGameCompleteAndroid Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
BouncingGameEmptyAndroid Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
BuiltInViews Add brief description tag to metadata.xml Apr 16, 2015
Button Add brief description tag to metadata.xml Apr 16, 2015
CalendarDemo Add brief description tag to metadata.xml Apr 16, 2015
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 [CommonSampleLibrary] Update to Xamarin targets file Mar 29, 2016
ContactManager Add brief description tag to metadata.xml Apr 16, 2015
Contactables [Contactables] Fix InvalidCastException Apr 14, 2015
ContactsProviderDemo Shorten brief descriptions Apr 23, 2015
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
FastScroll Add brief description tag to metadata.xml Apr 16, 2015
FilePickerExample Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
FingerprintGuide Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
FragmentTransition [FragmentTransition] Fix for #41354 May 27, 2016
FragmentsWalkthrough Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
FrameAnimation Add brief description tag to metadata.xml Apr 16, 2015
FusedLocationProvider Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Add brief description tag to metadata.xml Apr 16, 2015
GetMobileNetworkStrength Adding some code comments/code formatting. Nov 25, 2013
GooglePlayServices Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
ImageEffects [imageEffects]Android Version fix Aug 1, 2014
JNIDemo Update samples to compatible target framework Sep 30, 2014
JavaIntegration Add readme for JavaIntegration directory Feb 3, 2016
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
Location Add brief description tag to metadata.xml Apr 16, 2015
ManagedAndroidResourceTest Update samples to compatible target framework Sep 30, 2014
MapsAndLocationDemo_v3 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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] Remove SupportedAbis and empty tags May 5, 2016
NotePad More target framework fixes for 5.0 Nov 25, 2014
OneABIPerAPK Add brief description tag to metadata.xml Apr 16, 2015
OsmDroidBindingExample Add brief description tag to metadata.xml Apr 16, 2015
Phoneword Shorten brief descriptions Apr 23, 2015
PhonewordMultiscreen Add brief description tag to metadata.xml Apr 16, 2015
PlatformFeatures Add metadata to systemuivisility demo. Feb 12, 2016
PopupMenuDemo Add brief description tag to metadata.xml Apr 16, 2015
RemoteNotifications Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Add brief description tag to metadata.xml Apr 16, 2015
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
Snake Add brief description tag to metadata.xml Apr 16, 2015
SplashScreen Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
Supportv7 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
SvgAndroid Add brief description tag to metadata.xml Apr 16, 2015
SwipeToRefresh Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
UserInterface Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
ViewPagerIndicator Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
ViewPagerIndicatorBinding Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
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 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
android-n [Nougat] Use Custom Attributes over manifest declarations (#145) Aug 29, 2016
android5.0 Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
google-services Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
tv Update NuGet package versions and fix error conditions (#140) Aug 16, 2016
wear Merge pull request #132 from andrew-nemtsev/patch-1 Aug 22, 2016
.gitignore Fixed up using orientations incorrectly according to latest CC# changes. Oct 13, 2014
README.md Updated README file Mar 2, 2015
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#.

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 our two sample galleries here:

Sample GitHub Repositories

These sample galleries are populated by samples in our six sample 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 ping Nat or Miguel for repo commit access.

However, 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 x-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!