Android v10.1.1 support for Online Samples

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:

Local Samples
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.
Remote Samples
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.

  1. From Eclipse’s File menu, choose New and select Project.
  2. In the New Project Dialog box, expand the ArcGIS for Android folder.
  3. Choose the ArcGIS Samples for Android option and click Next.

    New Sample Wizard

  4. Check the box for Remote samples from ArcGIS Online and click Next.

    Remote Samples from ArcGIS Online

  5. The Select a Sampleselection box populates with some samples ArcGIS Online.

    Select a Sample from ArcGIS Online

  6. 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.

    Filter samples on Editor tag

  7. You select a sample to create by clicking on it.  You will see a selection bar next to the sample you have selected.

    Selected Sample

  8. 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.

This entry was posted in Developer, Mobile and tagged , , , , , . Bookmark the permalink.

Leave a Reply

3 Comments

  1. vestanbul says:

    I think there is something wrong with samples. Some of them do not have gen folders.

  2. vestanbul says:

    I think there is something wrong with samples. Some of them do not have gen folders. We are not able to build the projects… Did you know about that issue?

  3. Dan O'Neill says:

    The gen folder is ‘generated’ by the Android Developer Tools (ADT) plugin. When you create a new remote samples project from the ArcGIS Android SDK Plugin the project is created for you and the gen folder is created automatically. You could be getting errors when creating the project if the compiler settings are not set correctly. To resolve this in Eclipse do the following:

    Package Explorer -> Right click the project -> “Android Tools” -> “Fix Project Properties”
    Project -> Clean