Mobile SDK for Windows Apps2.0
Transforming Windows apps into Mobile apps
Known Issues

There are existing issues with Citrix Mobility Pack on XenDesktop which will be addressed in a future release.

Reconnect Issue

With any Citrix-related feature, it is expected that a reconnect to an existing session will not disrupt that feature. Citrix Mobility Pack is no exception. Communication between the mobile device and the session applications is restored. This all works fine in XenApp but there is an issue whereby the reconnect on XenDesktop will not automatically restore the Citrix Mobility Pack feature.

The reason this happened was because XenApp and XenDesktop act very differently related to reconnect events. The Citrix Mobility Pack code is not getting the same level of notification on XenDesktop as it would on XenApp.

Other features in XenDesktop have corrected this by more closely watching for connect/disconnect events. Citrix Mobility Pack needs this strategy as well but not yet.

There is a workaround for this issue but it is up to the developer of the applications to add this workaround into the application code. The main idea is to reset the virtual channel session.

The order of actions is:

  • Check to see if virtual channel is open
  • If not open, proceed to close the existing session
  • Open a new session

It is best to do this check before calling the next CMP API. Another possible strategy is to using a polling loop that checks occasionally. Checking before each API call is guaranteed but creates some overhead for calling CMP API.

This overhead can be reduced by creating a common function to do the work.

        // <summary>
        // Restart the virtual channel session if it is currently closed
        // </summary>
        public Int32 ConfirmConnection()
        {
            Int32 rc = (Int32)CMP_ERROR_ID.CMP_NO_ERROR;

            if (!cmp.IsChannelOpen())
            {
                // this is probably a disconnect so we need to reset our link
                CloseSession();
                rc = OpenSession();
            }

            return (rc);
        }

The entire sample that uses this tactic is under winform\displaysettings.

In the displaysettings example, the CMP API is wrapped and the wrapper functions call ConfirmConnection.

        // <summary>
        // Wrapper function for GetOrientation
        // </summary>
        public Int32 GetOrientation(ref CMP_ORIENTATION_DATA orientData)
        {
            Int32 rc = (Int32)CMP_ERROR_ID.CMP_NO_ERROR;

            if (cmp != null)
            {
                rc = ConfirmConnection();

                if (CMPApp.CMP_SUCCESS(rc))
                {
                    rc = cmp.GetOrientation(out orientData);
                }
            }
            else
            {
                rc = (Int32)CMP_ERROR_ID.CMP_ERROR_NOT_CONNECTED;
            }

            return (rc);
        }

This approach was tested with XenDesktop 5.6 FP1 and it works fine.

Device Information

Based on a similar problem to Reconnect Issue, it is possible to perform a disconnect/reconnect and have the device information still be based on the original device. This only happens on XenDesktop. Essentially the CMP code thinks that it is still connected to the original device.

In order to correct this, do the same thing as Reconnect Issue. Once the virtual channel session has been reset, the right device information will be available.

Redirect Button

If an application redirects button notification to the server application, it is important to restore the original setting of the button redirection before the application exits. Otherwise the button redirection will continue to be in effect and button presses will be lost. Receiver will not process the button presses locally which could cause problems for the user. The "back" button is commonly used to go back to the previous layer. If the "back" button is pressed by the user when the application has not restored the state of the redirect, the Receiver will not go back to the connection screen.

It is important to clean up the button redirects in the application. All that is needed is to redirect back to the client device.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Events Defines