The ArcGIS Runtime SDK for Android provides a variety of samples to assist in understanding the fundamentals of our ArcGIS Android API’s and coding patterns. We package samples inside the SDK Eclipse plugin and allow you to import the sample code as an Eclipse project. This is a terrific way to get familiar with our API and coding patterns, but since they are released with the product they are on the same roadmap as our API releases. In order to allow for samples to be updated or added in between release cycles we introduced a new ArcGIS for Android SDK Samples Group on ArcGIS Online. This group is a collection of Android samples that you can download individually or use a new feature in our SDK plugin that allows you to create a new sample project directly from ArcGIS Online. We now define our samples as local or remote as explained below:
These samples are provided with the Eclipse plugin and are created from your local copy of the samples that come with the SDK at release time.
These samples are hosted on ArcGIS Online and represent the most up to date version of the samples and any new samples added after the SDK release.
Creating a New Remote Sample project
With the release of 10.1.1 we redesigned our New Sample wizard to support downloading and creating a new sample Eclipse project from the samples we have hosted on ArcGIS Online.
- From Eclipse’s File menu, choose New and select Project.
- In the New Project Dialog box, expand the ArcGIS for Android folder.
- Choose the ArcGIS Samples for Android option and click Next.
- Check the box for Remote samples from ArcGIS Online and click Next.
- The Select a Sampleselection box populates with some samples ArcGIS Online.
- You can search ArcGIS Online for more samples by typing in some search text and clicking the search button. The search is based on the samples tags which match our local samples grouping. So if you type in Editing you will get the samples that showcase our Editing sample apps.
- You select a sample to create by clicking on it. You will see a selection bar next to the sample you have selected.
- Click Finish to create the sample project in your local Eclipse workspace.
Samples are designed to execute once imported into your Eclipse workspace. See the documentation for each sample on ArcGIS Online for any special instructions that might be required of you when working with the sample.