Introduction to application customization
Overview
ArcGIS Mobile ships ready-to-deploy mobile applications for Windows Mobile and the Windows tablet environment. The applications are workflow-driven and data-centric and are designed to help field workers perform data collection and feature inspection. They serve as a mobile client that can consume mobile services published on ArcGIS Server and have been optimized to communicate with the server regarding data synchronization, or as a client that consumes a geoprocessing tool generated cache that is part of a desktop workflow.
The ready-to-deploy mobile applications provide common tasks that can be used by field workers out of the box. They include a ViewMapTask that allows users to view and navigate geospatial information, a CollectFeaturesTask that has various data collection methods for geometry collection and attribute editing, a SearchTask that can be used to make a query on datasets stored on a mobile device, a WorkListTask that can be used to store a collection of features for various purposes, and a ManageTask that communicates with ArcGIS Server for data synchronization. Optionally, users can also use the FieldCrewTask or LoggingExtension to communicate with their field crews in a more convenient way.
These tasks are designed to be easy to use and can be simply configured for your data, but modifying the task requires some programming. What if your organization requires a different geometry collection method from what is supplied in the application? Or maybe you want to add a few custom functions to your ViewMaptask so your workers can work in the way that they are most comfortable. There are many times when there is a need to customize the ready-to-deploy mobile application and make it work more efficiently for your organization's data collection and feature inspection procedures.
The ArcGIS Mobile software development kit (SDK) provides application programming interfaces (APIs) to build your applications or customize the provided applications. To customize the ready-to-deploy applications, the application framework is exposed. It allows you to either change the behavior of existing tasks and extensions or create new tasks and extensions for new workflow or functionality. By developing a custom Task or ProjectExtension, your field crew gets a task based on their workflow, and you improve their efficiency.
Using the ArcGIS Mobile applications as a foundation for your field solution means that you can leverage the application framework and functionality and provide your own business logic and workflows. This will reduce the amount of programming and maintenance of your field solution.
The application framework provides a set of APIs that you can leverage to extend the ready-to-deploy mobile applications. The design of the mobile applications are very similar, including their task-based user interface and the underlying application framework.
The application framework is built on top of the core Mobile SDK and thus has dependency on the core SDK ESRI.ArcGIS.Mobile.dll assembly.
The following diagram shows the relationship between the core Mobile framework API and the application framework APIs:
ArcGIS Mobile provides application framework APIs for both Windows and Windows Mobile platforms. Both sets of APIs share the same design and architecture and have similar classes and functions. However, they are not identical due to the differences in their target operating systems. Since the Windows Mobile development environment is VB .NET or CSharp and the Windows development environment is WPF, a customization cannot be used in both applications. The target application should be chosen before beginning development. If an extension is to be written for both applications, the design and business requirements can be applied to both while the implementation is done separately. The SDK Help is separated into Customizing the Windows Mobile application and Customizing the Windows application. In both sections of the Help, you'll find diagrams, conceptual topics, and samples to assist in your development.
Key concepts and classes
Although there are minor differences between the application framework for Windows Mobile and for Windows, the architecture of the two remains the same. Both are ready-to-deploy applications, designed with a task-based, workflow-driven philosophy. The applications use the following key concepts:
-
MobileApplication
-
Project
-
Task
-
ProjectExtension
The application framework provides the MobileApplication class representing the out-of-the -box application running on devices. From MobileApplication, you can get access to application-level functionality such as hardware management (that is, Global Positioning System [GPS] configuration). However, MobileApplication is most commonly used for workflow navigation. It provides methods for you to transition from one page (or dialog box) to another, along a predefined workflow. This allows you to focus more on custom functionality implementation and spend less time on other programming routines.
One mobile device can store multiple projects, but only one project can be opened at a time. You can get access to the current project through MobileApplication as well. The Project class normally contains a collection of tasks that field workers can use. By default, the application includes tasks and functionality for the following:
- Viewing operational and basemap data
- Collecting new GIS features by sketching, GPS, or entering coordinates
- Querying features
- Managing a collection of features in a work list
- Collaborating and tracking field workers
- Managing local edits and synchronizing data between the field and office
With the application framework, you can customize most tasks to make them fit better for your organization's field operation.
In addition to customizing existing tasks, you can also create your own custom tasks or extensions. A new task is listed on the user interface (UI), where you can select tasks, and starts executing when it's tapped or clicked. Typically, a task starts a workflow, while an extension is primarily used to customize or extend the application or existing tasks. In other words, extensions are designed for customizing behavior of existing tasks or pages. For example, you may have a Navigation task that allows the user to select a destination from the map and shows a turn-by-turn map as the user's location changes. Or, you may have a new menu item on the ViewMapTask that provides a customized way for zooming in or out.
To minimize your development efforts when using the application framework, the framework provides a complete set of classes you can use for developing a new task or extension. For example, in Windows Mobile, page and dialog classes can be commonly used to create a page or dialog style form that you can show along your workflow. They also work with MobileApplication so that you can easily transition the user from one page or dialog box to another with minimal programming efforts. If you need to show or edit attributes of a selected feature, use ViewAttributesPage or EditAttributesPage. Both have built-in functionality for convenient attribute viewing and editing. The MapPage, with a shared map component across different MapPage instances, not only minimizes resource consumption but also allows for customization of its menu and TitleBar to have a different look and feel.