Integration features
Developing ArcGIS applications for Android is simplified by a group of Eclipse plugins provided with the SDK, ArcGIS for Android Core and ArcGIS for Android Doc and Samples. The ArcGIS for Android Eclipse plugins provide a rich set of tools, documentation, and samples to help developers create applications using the ArcGIS API for Android. The following document captures and summarizes the significant features that are available to help the developer:
ArcGIS project for Android
When you create a new project in Eclipse to begin your development, there is a new project type made available through the ArcGIS for Android SDK plug-ins. Do the following in Eclipse to utilize this new project type for your applications:
- From Eclipse's File menu, choose New and click Project.
- On the New Project dialog box, expand the ArcGIS for Android folder.
- Choose the ArcGIS Project for Android option and click Next.
- On the Create ArcGIS for Android Project dialog box, enter a project name and click Next.
- In the Applicaiton Info dialog box enter the Package name and click Finish.
The project that is created is defined with all the components that are required for you to begin developing your applications using the ArcGIS API for Android. For example, notice the Referenced Libraries container. If you expand this container in your new project, you will observe the following required Java archive (JAR) files:
- ArcGIS_Android.jar: This library file represents the ArcGIS API for Android.
- jackson-core-lgpl-1.9.5.jar and jackson-mapper-lgpl-1.9.5.jar: These libraries represent tools used by the framework to handle the JSON parsing.
Convert to ArcGIS Android Project
In addition to creating new ArcGIS Projects for Android, you can convert existing Android project to ArcGIS for Android projects with a simple right click menu tool.
ArcGIS Tools Context Menu
Eclipse provides the ability to add sub-menus to the context menu of a Navigator View which allows tight integration between the ArcGIS Runtime SDK for Android and a your existing Eclipse Android project. The context menu is displayed when you select your project root folder in the package explorer via a right mouse click. You will see the ArcGIS Tools category when the project is an Android project.
- Right click your Android Project and select ArcGIS Tools > Convert to ArcGIS Android Project. This will only be active if the project is an Android Project.
- The tool adds the following resources to your existing Android Project
- Required Jars are added to the project.
- Native library support for armv6 and arvm7 devices.
- Android Manifest is updated to The OpenGL ES version required by ArcGIS applications and required use permissions are added if not present.
Once complete, your Android project is ready to add ArcGIS mapping features to the application.
Localization of Popups text
ArcGIS for Android project applications default language is English. You can use the SDK tooling feature when you want to localize ArcGIS Android popups text to another supported language. Once your project is an ArcGIS for Android project you can easily provide localization of popups text using a similar right click menu tool.
- Right click your ArcGIS for Android project and select ArcGIS Tools > UI Localization. This will only be active on ArcGIS for Android projects.
- The UI Localization dialog window appears
- Check the language you would like to add and click Finish
The tool adds your selected language text in a file in the appropraite langauge folder structure.
- res/values-zh/arcgis_ui_strings.xml
If you device is set to any language other than Chinese, then the ArcGIS popups text will load from res/values/arcgis_ui_strings.xml. If the device is set to Chinese, then the ArcGIS popups text will load from the res/values-zh/arcgis_ui_strings.xml.
Documentation
ArcGIS API for Android will assist developers in writing their applications by providing conceptual documentation and various code snippets. The ArcGIS for Android Doc and Samples plug-in contains all the conceptual documentation and code snippets and can be accessed through the Eclipse help system as follows:
- After you have installed the plug-ins, click the Help menu from Eclipse and click Contents.
- In the table of contents, expand the ArcGIS API for Android booklet.
If you are new to ArcGIS API for Android, you can open the Getting started book to find some preliminary documents to help you get started with your development work. More advanced developers can expand the samples and reference books to start digging into existing source code and the API documentation to build applications.
Samples
ArcGIS Samples for Android are simple apps for developers to understand and implement the essential features in their own applications. The How to work with samples document gives details on how to import samples into your Eclipse workspace and run applications. The samples are designed to educate developers on common workflows and best practices when working with ArcGIS API for Android.