Deploying extensions

Complexity: Beginner Data Requirement: Installed with software

Once you develop your ArcGIS Mobile extension using the Application Framework, you need to successfully deploy that extension to the field devices for it to be used. Successful deployment involves two key steps:

Steps:
  1. Deploy your extension assembly to field devices.

    To deploy your task or extension assembly, you can simply copy your assembly from the development machine to your mobile device.

    Make sure you deploy the assembly to the appropriate target folder:

    Windows Mobile Devices

    The target folder location is \Program Files\ArcGIS\Mobile\10. Typically this requires a connection between your development machine and your device through ActiveSync (on XP) or Windows Mobile Device Center (on Vista/7).

    For testing purposes, you can set your output folder in Visual Studio to deploy your extension assembly in a semiautomatic way:

    a. With your project open in Visual Studio IDE, click the project name to bring up its property window. Set Output File Folder to %CSIDL_PROGRAM_FILES%\ArcGIS Mobile\10.

    b. Right-click the project in Solution Explorer and choose Deploy. Visual Studio builds the project and deploys the assembly to your device automatically.

    NoteNote:

    Your device needs to be docked at the time of deployment.

    Need alt text

    Windows

    The target folder can be one of the following two locations:

    Option 1: <ArcGIS Mobile Install Path>\bin

    Option 2: C:\ProgramData\ESRI\ArcGIS Mobile\Extensions\ (for Vista and Windows 7) or C:\Documents and Settings\All Users\Application Data\ESRI\ArcGIS Mobile\Extensions (for XP)

  2. Reference your extension inside an ArcGIS Mobile project.

    ArcGIS Mobile applications reference tasks and capabilities using a project file (.amp file). Project files are created and managed using the Mobile Project Center application. Mobile Project Center is the primary way that you will include a reference to your extension assembly.

    To achieve this, you need to create an additional assembly (MPC assembly) that describes your task or extension and put it at the following location so it can be picked up by Mobile Project Center:

    <ArcGIS Mobile Install Path>\Mobile10\bin\Extensions

    NoteNote:

    The first time you deploy an MPC assembly, you may need to manually create an Extensions folder under the bin folder.

    You can create an MPC assembly by using the project templates. If you create your extensions using the project templates, an MPC project will be created for you. You can use either the Task or Project Extension template to create an empty solution that contains not only your task or extension project but also the MPC project.

    After you deploy the MPC assembly to the Extensions folder, Mobile Project Center is able to load it when it starts up, and you can create a mobile project that references your custom task or extension assembly. To include your task or extension in the mobile project being created, add it to your project. For example, if you have deployed an MPC assembly that describes a task assembly on the mobile device, you can open Mobile Project Center, and in the Taskpanel on the left, click Add at the top. Mobile Project Center shows your new task. Select the task you want to add and finish any configuration (if available).

Example: Adding a new task to a mobile project

Assume that you developed a task and an MPC assembly that describes that task. Now you have deployed the MPC assembly to the folder mentioned above.

Steps:
  1. Launch Mobile Project Center and create a new project.
  2. Click the Tasks button in the left panel.
  3. Click the Add arrow. The name for your custom task is listed.
  4. Click your custom task to select it. The task is added to your Tasks list.

    Need alt text

    Need alt text

  5. If the task or extension that you create has optional properties, those properties can be exposed inside Mobile Project Center. To create those properties, follow these steps:
    1. Create variables inside the Mobile Project Center project and bind the controls you created in step 1 to these variables.
    2. Make sure you read/write these variables with ReadXML and WriteXML methods inside the project.

      This screen capture shows the sample when it's loaded by Mobile Project Center:

      Need alt text here


9/20/2011