Deploying your custom extensions\tasks
After you develop your custom extension or task using the Application Framework, you need to deploy that extension to the field devices where it will be used. Successful deployment involves using the Mobile Project Center [MPC] to package your customization with a project. You have the ability to deploy one or more custom tasks or extensions (which is termed "capabilities" in MPC) that modify existing functionality or to embed new features into your project. When saving a mobile project, MPC copies the assemblies with the implementation of these tasks and/or extensions you have developed to the project folder. The correct assembly is deployed together with the project into the field devices; therefore, there is no need to separately deploy these custom tasks and extensions.
- Shutdown the MPC so it can integrate your customization.
- Copy your extension assembly to the MPC folders.
Make sure that you have the extension assemblies compiled and ready to deploy. You should have a set of two or three assemblies for each task/extension: one is built for use by MPC and the other assembly or assemblies include(s) the actual implementation of the task/extension used by the field applications. Recall that separate assemblies are required for Windows and Windows Mobile platforms.
-
The assembly for MPC should be copied to:
- For Windows 7 machines: C:\ProgramData\ESRI\MobileProjectCenter\Extensions
- For Windows XP machines: C:\Documents and Settings\All Users\Application Data\ESRI\MobileProjectCenter\Extensions
-
The assembly with the implementation for the field applications should be copied to:
- For Windows 7 machines: C:\ProgramData\ESRI\MobileProjectCenter\Extensions\Win32 if your task/extension runs in Windows devices or notebook, or C:\ProgramData\ESRI\MobileProjectCenter\Extensions\WinCE if your task/extension runs in Windows Mobile device.
- For Windows XP machines: C:\Documents and Settings\All Users\Application Data\ESRI\MobileProjectCenter\Extensions\Win32 folder if your task/extension runs in Windows devices or notebook, or C:\Documents and Settings\All Users\Application Data\ESRI\MobileProjectCenter\Extensions\WinCE folder if your task/extension runs in Windows Mobile devices.
The first time you include custom tasks/extensions in a mobile project, you may need to manually create the Extensions\Win32 and Extensions\WinCE folders at the locations specified in step 2b.
Make sure you deploy the assembly to the appropriate target folder: since they are not interchangeable.
-
- Create a new project or open an existing project in MPC.
- Add the task to the project.
To add a custom task, click the Tasks tab on the left panel, then click the Add button.
You will see the custom tasks at the end of the available list of tasks:
Click the custom task that you want to include from the list.
- To add a custom extension, click the Capabilities tab on the left panel, then click the Add button. Click the custom extension you want to use from the list, in the same procedure used to add a task.
- Configure other settings of your project then save the project.
- After you save the project, MPC automatically copies the assemblies with the implementation of the custom tasks/extensions to <Project Folder>\Extensions\Win32 if the assemblies work on Windows devices, or <Project Folder>\Extensions\WinCE if the assemblies work on Windows Mobile devices.
Updating custom tasks or extensions
In some cases, you might update the task/extension with the implementation detail while keeping the assembly's namespace, class name, and assembly file the same. If so, you only need to overwrite the older assembly with the updated assembly in the appropriate folder as addressed in step 8 in the last section.
If, however, you update the custom task or extension in the assembly with the implementation but also in the assembly for use by MPC, restart MPC and re-open the project, then remove the existing task/extension and add the updated one back in as described in steps 4-6 in the last section.