How to work with samples
The ArcGIS Runtime SDK samples for Android are tools for developers to understand and implement the fundamental ArcGIS Android API and coding practices. This document describes how to access the samples, import them into your Eclipse integrated development environment (IDE), then run them once they are within Eclipse.
Using the Eclipse IDE to import samples
Once you have successfully installed the Esri-provided plug-ins, you can use Eclipse's 'New Project' wizard to import samples into your workspace. Sample projects are located locally within the plugin or remotely on ArcGIS Online. The ArcGIS Samples for Android New Project wizard allows you to select whether you want to create a local sample project or a remote sample project. In some cases the samples provided are the same, but remote samples do allow the ability to add samples after release as well as update samples during a release cycle. So by this measure, the remote samples are always the most up to date samples for the current release and there can be samples availabel remotely that are not available locally. The following gives step-by-step instruction for accessing samples locally and remote then importing them into your Eclipse workspace
Local Samples
These samples are provided with the Ecilpse plugin and are created from you local copy to your Ecilpse workspace. These samples are available at time of release.
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.
Running the samples
Samples are designed to execute once imported into the Eclipse IDE. See the documentation for each sample for any special instructions that might be required of you when working with the sample. In general, If you right-click the sample project in Eclipse and choose Run as > Android application, the sample should execute on your physical device.
Please refer to the following Android developer guide topic for Building and Running from Ecilpse with ADT using either the device or emulator.
Using a physical Android device
You can develop and test your sample application directly on a physical device connected to your machine through a USB connection. See the specific section in Android's Dev Guide for developing on a physical device. Identical to the AVD, once the physical device is set up, the same instructions can be followed for deploying your applications to a phone.
Using an Android Emulator
Please refer to the following blog post for steps to deploy your apps to an emulator