Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A collection of Xamarin.Android sample projects.
Failed to load latest commit information.
AIDLDemo [AIDLDemo] Add AndroidManifest.xml
AccelerometerPlay [AccelerometerPlay] Background on tablet fix
AccessoryViews Fixing AccessoryViews, making the ChoiceMode only assigned to an enum.
ActionBarPullToRefresh [ActionBarPullToRefresh] fix bug #20884 - correct generic constrained…
ActionBarSherlock Revert "[ActionBarSherlock] Update references"
ActionBarViewPager Fix title, reformat
AdMob Added gallery opt-in to metadata files
AdvancedAppLifecycleDemos Added gallery opt-in to metadata files
AdvancedImmersiveMode Add missing Metadata.xml files for a few new kitkat samples
AnalyticsV2 Add Google Analytics V2 SDK binding sample.
AndroidBeamDemo Added gallery opt-in to metadata files
AndroidMapViewBalloons Just updating the README on a project that used Android Maps V1 (depr…
ApiDemo Update ApiDemo and Support4 resources
AppRestrictions Add new API-18 sample 'AppRestrictions'
AsyncImageAndroid Added gallery opt-in to metadata files
BasicImmersiveMode [BasicImmersiveMode] Fix build error due to .ds_store file
BasicMediaRouter Add android sample 'BasicMediaRouter'
BasicTableAdapter Adding ReadMe Files
BasicTableAndroid Adding ReadMe Files
BatchStepSensor Added BatchStepSensor KitKat project
BluetoothChat Added gallery opt-in to metadata files
BluetoothLeGatt Fix XamBug 16819 due to enum parameter change
BorderlessButtons Added gallery opt-in to metadata files
BouncingGameCompleteAndroid Updated to use CocosSharp 1.3
BouncingGameEmptyAndroid Updated to use CocosSharp 1.3
BuiltInViews Set minimum SDK version so mac builds work.
Button Added gallery opt-in to metadata files
CalendarDemo Added gallery opt-in to metadata files
CameraAppDemo FIxed CameraAppDemo Folder Exists logic
CardEmulation [CardEmulation] Update readme file
CardReader Add local CommonSampleLibrary to CardReader
CommonSampleLibrary Add missing Metadata.xml files for a few new kitkat samples
ContactManager Added gallery opt-in to metadata files
Contactables Add new API18 sample Contactables
ContactsProviderDemo Added gallery opt-in to metadata files
ContentControls removed duplicate samples
ContentProvider Added gallery opt-in to metadata files
CursorTableAdapter Fixed CursorTableAdapter/HomeScreen.cs error, using old API
CustomChoiceList Fix for case sensitive filesystem.
CustomRowView Adding ReadMe Files
CustomTransitions [CustomTransitions]Readme spacing fix
DoneBar Add new android sample 'DoneBar'
DynamicTest [DynamicTest] Add null checking
Example_WorkingWithAudio Added gallery opt-in to metadata files
ExportAttribute Added gallery opt-in to metadata files
Facebook Fix issue: couldn't login in Release Mode
FastScroll Adding ReadMe Files
FilePickerExample Add a README.md
FragmentTransition FragmentTransition layout fix
FragmentsWalkthrough [Honeycomb] Remove invalid min sdk version of 10
FrameAnimation Added the code for the FrameAnimation recipe.
FusedLocationProvider Added gallery opt-in to metadata files
GLCube-1.0 [samples] remove some old dups from showing in Gallery
GLCube [samples] remove some old dups from showing in Gallery
GLDiagnostics-1.0 [samples] remove some old dups from showing in Gallery
GLDiagnostics [samples] remove some old dups from showing in Gallery
GLDiagnostics30 Added gallery opt-in to metadata files
GLNativeES20 Resource folder cleanup
GLNativeES30 [GLNativeES30] Cleanly fails on unsupported HW
GLSharedContext20 Added missing files for GLSharedContext20
GLTriangle20-1.0 [samples] remove some old dups from showing in Gallery
GLTriangle20 [samples] remove some old dups from showing in Gallery
GLTriangle30 [samples] remove some old dups from showing in Gallery
GestureBuilder [GestureBuilder] Reload gestures after rename
GetMobileNetworkStrength Adding some code comments/code formatting.
GooglePlayServices Update tags for maps + location
GraphicsAndAnimation Moved Android-only GraphicsAndAnimation.Android from mobile-samples a…
GridLayoutDemo [GridLayoutDemo] Add AndroidManifest.xml
HelloM4A [HelloM4A] Add AndroidManifest.xml
HelloMultiScreen Added gallery opt-in to metadata files
HelloTabsICS [HelloTabsICS] Add AndroidManifest.xml
HelloWorld Added gallery opt-in to metadata files
HoneycombGallery Added gallery opt-in to metadata files
ImageEffects [imageEffects]Android Version fix
JNIDemo Deleted files from the old JNIDemo
JetBoy Added gallery opt-in to metadata files
JniDemo Another file?
KitKat [KitKat] Added Toast Response to sensor start
LabelledSections [LabelledSections] Add AndroidManifest.xml
LeaderboardsAndAchievementsDemo Added a Sample for Google Play Game Services
LiveWallpaperDemo Added gallery opt-in to metadata files
LoadingLargeBitmaps Add a README and a screenshot for the app.
LocalFiles Add async changes in LocalFiles sample
Location [Location] Add LocationManager.NetworkProvider checking to fix xambug…
ManagedAndroidResourceTest [ManagedAndroidResourceTest] Add AndroidManifest.xml
MapsAndLocationDemo [samples] remove some old dups from showing in Gallery
MapsAndLocationDemo_v2 Updated metadata.xml to include IParceable on some more types.
MapsAndLocationDemo_v3 [samples] remove some old dups from showing in Gallery
MapsDemo Added gallery opt-in to metadata files
ModelAndVerts Removed "Normal" from verts since we don't do anything with lighting.
ModelDrawing Oops, forgot to save this file prior to the commit.
MonoGame3DCamera Committed Camera + 3D movement project.
MonoIO [MonoIO] Fixed typo in large layout file
MultiResolution [MultiResolution] Add AndroidManifest.xml
NfcSample Revert "Set TargetFrameworkVersion to 2.3.3."
NineOldAndroids Add NineOldAndroids binding sample.
NotePad-Mono.Data.Sqlite Added gallery opt-in to metadata files
NotePad Resource folder cleanup
OneABIPerAPK Include the ABI in the android:versionName as well.
OsmDroidBindingExample Add a metadata.xml so this gets picked up in the samples. #61
PopupMenuDemo Added gallery opt-in to metadata files
RotationDemo [RotationDemo] Increased authRequest timeout
SanAngeles_NDK Added gallery opt-in to metadata files
SanityTests Fix various SanityTests build issues.
SearchableDictionary Added gallery opt-in to metadata files
SectionIndex Adding ReadMe Files
ServiceSamples [DemoService] Add AndroidManifest.xml
ShareActionProviderDemo Added gallery opt-in to metadata files
SierpinskiES31 show informative text when ES3.1 is not available
SimpleCursorTableAdapter Adding ReadMe Files
SimpleWidget Added gallery opt-in to metadata files
SkeletonApp Added gallery opt-in to metadata files
SlidingMenu [SlidingMenuExample] Add AndroidManifest.xml
Snake Updated sample images
SplashScreen Adding SplashScreen sample.
StandardControls removed duplicate samples
StorageClient Add missing Metadata.xml files for a few new kitkat samples
StorageProvider Add missing Metadata.xml files for a few new kitkat samples
Support4 Update ApiDemo and Support4 resources
Supportv7 Update NuGets to final packages 21.0.3.0
SvgAndroid [SvgAndroidSample] Add AndroidManifest.xml
SwipeToRefresh [SwipeToRefresh] Fix namespace in axml
SwitchDemo [SwitchDemo] Add AndroidManifest.xml
SystemUIVisibilityDemo [SystemUIVisibilityDemo]Updated properties
TablesAndCellStyles removed duplicate samples
TextureViewDemo [TextureViewDemo] Fix for devices without rear camera
TexturedCube-1.0 [samples] remove some old dups from showing in Gallery
TexturedCube [samples] remove some old dups from showing in Gallery
TexturedCubeES30-1.0 use mipmaps to speedup rendering, recycle bitmap
UpdateUsersProfile New sample app for Update User's Profile recipe.
UrbanAirship [UrbanAirship/PushSample] Update Push sample to use urbanairship-lib-…
ViewPagerIndicator Added gallery opt-in to metadata files
ViewPagerIndicatorBinding [ViewPagerIndicator-Example] Add AndroidManifest.xml
WalkingGameCompleteAndroid Added metadata and readme's (missing from my last commit)
WalkingGameEmptyAndroid Added metadata and readme's (missing from my last commit)
WeatherREST Tweak for clarity.
WebViewJavaScriptInterface Changed solution's Release Configuration Mapping to build the project…
android_l Update RecyclerViewer screenshot.
android_tv [VisualGameController] Rename directories
wear Update tags for maps + location
.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.