Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A collection of Xamarin.Android sample projects.
C# C HTML Shell GLSL Ruby
Failed to load latest commit information.
AIDLDemo [AIDLDemo] Add AndroidManifest.xml
AccelerometerPlay Add brief description tag to metadata.xml
AccessoryViews Add brief description tag to metadata.xml
ActionBarPullToRefresh Sample updates for 5.0 up to MonoIO
ActionBarSherlock ActionBarSherlock support packages fix
ActionBarViewPager Shorten brief descriptions
AdvancedAppLifecycleDemos Add brief description tag to metadata.xml
AdvancedImmersiveMode [AdvancedImmersiveMode] Use Android.App over Android.Support.V4.App
AnalyticsV2 Update samples to compatible target framework
AndroidBeamDemo Add brief description tag to metadata.xml
AndroidMapViewBalloons Update samples to compatible target framework
ApiDemo Add brief description tag to metadata.xml
AppRestrictions Add new API-18 sample 'AppRestrictions'
AsyncImageAndroid Shorten brief descriptions
BasicImmersiveMode [BasicImmersiveMode] Use Android.App over Android.Support.V4.App
BasicMediaRouter Add android sample 'BasicMediaRouter'
BasicTableAdapter Add brief description tag to metadata.xml
BasicTableAndroid Add brief description tag to metadata.xml
BatchStepSensor [BatchStepSensor] Clean up and modify to work with new CommonSampleLi…
BluetoothChat Add brief description tag to metadata.xml
BluetoothLeGatt Fix XamBug 16819 due to enum parameter change
BorderlessButtons Add brief description tag to metadata.xml
BouncingGameCompleteAndroid Add brief description tag to metadata.xml
BouncingGameEmptyAndroid Add brief description tag to metadata.xml
BuiltInViews Add brief description tag to metadata.xml
Button Add brief description tag to metadata.xml
CalendarDemo Add brief description tag to metadata.xml
CameraAppDemo Update samples to compatible target framework
CardEmulation [Card Emulation/Reader] Clean up sample and add compatibility for Com…
CardReader [Card Emulation/Reader] Clean up sample and add compatibility for Com…
CocosSharpEntities Merge branch 'master' of https://github.com/xamarin/monodroid-samples
CommonSampleLibrary Android-Fit Fitness samples (BasicHistoryApi, BasicHistorySessions, B…
ContactManager Add brief description tag to metadata.xml
Contactables [Contactables] Fix InvalidCastException
ContactsProviderDemo Shorten brief descriptions
ContentControls removed duplicate samples
ContentProvider Add brief description tag to metadata.xml
CursorTableAdapter Add brief description tag to metadata.xml
CustomChoiceList Fix for case sensitive filesystem.
CustomRowView Add brief description tag to metadata.xml
CustomTransitions [CustomTransitions] Clean up and add compatibility for CommonSampleLi…
DoneBar Add new android sample 'DoneBar'
DynamicTest Add brief description tag to metadata.xml
Example_WorkingWithAudio Add brief description tag to metadata.xml
ExportAttribute Add brief description tag to metadata.xml
Facebook Add brief description tag to metadata.xml
FastScroll Add brief description tag to metadata.xml
FilePickerExample Sample updates for 5.0 up to MonoIO
FragmentTransition hide Download button, since referenced project is outside the root
FragmentsWalkthrough Honeycomb target framework fixes
FrameAnimation Add brief description tag to metadata.xml
FusedLocationProvider Update samples to GPS 25.0.0.0 final
GLCube-1.0 Add brief description tag to metadata.xml
GLCube Add brief description tag to metadata.xml
GLDiagnostics-1.0 Add brief description tag to metadata.xml
GLDiagnostics Add brief description tag to metadata.xml
GLDiagnostics30 Add brief description tag to metadata.xml
GLNativeES20 Update samples to compatible target framework
GLNativeES30 [GLNativeES30] Cleanly fails on unsupported HW
GLSharedContext20 Added missing files for GLSharedContext20
GLTriangle20-1.0 Add brief description tag to metadata.xml
GLTriangle20 Add brief description tag to metadata.xml
GLTriangle30 Add brief description tag to metadata.xml
GestureBuilder Add brief description tag to metadata.xml
GetMobileNetworkStrength Adding some code comments/code formatting.
GooglePlayServices [gps] update sample readme for Sample Gallery
GraphicsAndAnimation [GraphicsAndAnimation] Remove recently added reference causing build …
GridLayoutDemo Add brief description tag to metadata.xml
HelloM4A Add brief description tag to metadata.xml
HelloMultiScreen Add brief description tag to metadata.xml
HelloTabsICS Add brief description tag to metadata.xml
HelloWorld [HelloWorld] Include manifest in project
HoneycombGallery Shorten brief descriptions
ImageEffects [imageEffects]Android Version fix
JNIDemo Update samples to compatible target framework
JetBoy Add brief description tag to metadata.xml
JniDemo Add brief description tag to metadata.xml
KitKat Add brief description tag to metadata.xml
LabelledSections Shorten brief descriptions
LeaderboardsAndAchievementsDemo Update samples to GPS 25.0.0.0 final
LiveWallpaperDemo Add brief description tag to metadata.xml
LoadingLargeBitmaps Shorten brief descriptions
LocalFiles Update samples to compatible target framework
LocalNotifications New sample for Android local notifications (#651)
Location Add brief description tag to metadata.xml
ManagedAndroidResourceTest Update samples to compatible target framework
MapsAndLocationDemo_v3 Update samples to GPS 25.0.0.0 final
ModelAndVerts Add brief description tag to metadata.xml
ModelDrawing Add brief description tag to metadata.xml
MonoGame3DCamera Add brief description tag to metadata.xml
MonoIO Add brief description tag to metadata.xml
MultiResolution Shorten brief descriptions
NfcSample Revert "Set TargetFrameworkVersion to 2.3.3."
NineOldAndroids Update sample references up to ViewPagerIndicator
NotePad-Mono.Data.Sqlite Add brief description tag to metadata.xml
NotePad More target framework fixes for 5.0
OneABIPerAPK Add brief description tag to metadata.xml
OsmDroidBindingExample Add brief description tag to metadata.xml
Phoneword Shorten brief descriptions
PhonewordMultiscreen Add brief description tag to metadata.xml
PopupMenuDemo Add brief description tag to metadata.xml
RemoteNotifications Fix link in remote notifications readme.md
RotationDemo Add brief description tag to metadata.xml
SanAngeles_NDK [sanangeles] add native C++ debug demo
SanityTests Shorten brief descriptions
SearchableDictionary Shorten brief descriptions
SectionIndex Add brief description tag to metadata.xml
ServiceSamples Add brief description tag to metadata.xml
ShareActionProviderDemo Add brief description tag to metadata.xml
SierpinskiES31 Merge commit '96a698d2f687d6290d746268b97bffe2c94d29c7' into monodroi…
SimpleCursorTableAdapter Add brief description tag to metadata.xml
SimpleWidget Don't use string constants for class names.
SkeletonApp Add brief description tag to metadata.xml
SlidingMenu Update sample references up to ViewPagerIndicator
Snake Add brief description tag to metadata.xml
SplashScreen Update samples to compatible target framework
StandardControls removed duplicate samples
StorageClient [Storage Client/Provider] Clean up and add compatibility for CommonSa…
StorageProvider [Storage Client/Provider] Clean up and add compatibility for CommonSa…
Support4 [Support4] Update Target to 4.0.3
Supportv7 Update Support NuGets and fix popupTheme
SvgAndroid Add brief description tag to metadata.xml
SwipeToRefresh Shorten brief descriptions
SwitchDemo Add brief description tag to metadata.xml
SystemUIVisibilityDemo Add brief description tag to metadata.xml
TablesAndCellStyles removed duplicate samples
TextureViewDemo Add brief description tag to metadata.xml
TexturedCube-1.0 Add brief description tag to metadata.xml
TexturedCube Add brief description tag to metadata.xml
TexturedCubeES30-1.0 Add brief description tag to metadata.xml
UpdateUsersProfile Add brief description tag to metadata.xml
UrbanAirship Update more to compatible target frameworks
ViewPagerIndicator Add brief description tag to metadata.xml
ViewPagerIndicatorBinding Update more to compatible target frameworks
WalkingGameCompleteAndroid Add brief description tag to metadata.xml
WalkingGameEmptyAndroid Add brief description tag to metadata.xml
WeatherREST Add brief description tag to metadata.xml
WebViewJavaScriptInterface Add brief description tag to metadata.xml
android-m [FingerprintDialog] Return when fingerprint / lockscreen isn't set up
android5.0 [MediaBrowserService] Formatting updates
google-services [Location] Finalize gps location samples
tv Shorten brief descriptions
wear Update samples to GPS 25.0.0.0 final
.gitignore Fixed up using orientations incorrectly according to latest CC# changes.
README.md Updated README file
Xamarin.Edu.SampleGallery.Core.dll Update sample validator.
build.sh pass arguments to xbuild so that we can easily run /t:Clean.
install-hook.bat Added pre-commit hooks and the Xamarin code sample validator.
install-hook.sh Set executable bit on install-hook.sh.
pre-commit.posix Merge branch 'monodroid-4.1-preview'
pre-commit.windows Merge branch 'monodroid-4.1-preview'
samples.make Many more samples :-)
validate.posix Merge branch 'monodroid-4.1-preview'
validate.windows Fix order of options passed to `find` in scripts.
xbuild.make Add support for ADB_TARGET specification.
xcsv.exe Update sample validator.

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!

Something went wrong with that request. Please try again.