Launch Dynamics 365 Remote Assist from another app (protocol activation)

You can embed code in your HoloLens, iOS, or Android application to switch to Microsoft Dynamics 365 Remote Assist and begin a call using a Uniform Resource Identifier (URI).

For example, let’s say you’re creating a helicopter maintenance app. You can add a button that a maintenance engineer can use to call an expert if they get stuck. The button will launch Dynamics 365 Remote Assist and call the designated expert.

HoloLens Protocol Activation

The Dynamics 365 Remote Assist HoloLens application supports two methods for protocol activation:

  • “ms-voip-video” is for video-enabled calling.

  • “ms-voip-call” is for audio-only calling.

Both methods use the same argument schema, which accepts a “contactID” field. The URI would look something like this:

ms-voip-video:?contactids=\<contactID\>

The contact ID is the user’s Azure Active Directory (Azure AD) object ID.

Code example

You’ll need to embed the code in your HoloLens app. The following code example is written in C++, but can be easily adapted to another language.

Platform::String\^ id = objectId-\>Text;
auto uri = ref new Windows::Foundation::Uri("ms-voip-video:?contactids=" + id);
resultText-\>Text = uri-\>AbsoluteUri; 

concurrency::task\<bool\> launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri));
launchUriOperation.then([this](bool success)   
{         
    if (success)         
    {             
        // URI launched  
        resultText-\>Text += " (URI Launched)"; 
    } 
    else         
    {             
        // URI launch failed             
        resultText-\>Text += " (FAILED)";
    }     
});  

To place an audio-only call instead of video, use URI: “ms-voip-call:?contactids=”

Return to your app at the end of a call

An additional returnto field can be included to have Dynamics 365 Remote Assist return to your application when a call ends. This enables users to both start and end their experience in your app without having to manually switch between them.

To support the returnto field, you need to register your app with a custom URI (see Register an app with a custom URI).

Then include the optional returnto field along with the registered app name you completed in the previous step. In the example below, "helicoptor-maintenance-app" is the registered URI:

ms-voip-call:?contactids=<CONTACT_ID>&returnto=helicoptor-maintenance-app");

Example of launching Dynamics 365 Remote Assist from your app with optional returnto field

The following code example is written in C++, but can be easily adapted to another language.

Platform::String^ id = objectId->Text;
auto uri = ref new Windows::Foundation::Uri("ms-voip-video:?contactids=" + id + &returnto=helicoptor-maintenance-app");
resultText->Text = uri->AbsoluteUri; 

concurrency::task<bool> launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri));
launchUriOperation.then([this](bool success)   
{         
    if (success)         
    {             
        // URI launched  
        resultText->Text += " (URI Launched)"; 
    } 
    else         
    {             
        // URI launch failed             
        resultText->Text += " (FAILED)";
    }     
});  

Place a call to test your code

  1. Run your app on the HoloLens.

  2. Initiate the call from your app.

  3. The HoloLens will appear to close the app, open Dynamics 365 Remote Assist if it isn’t already open, and sign in.

  4. After the contacts panel is loaded, Dynamics 365 Remote Assist will place a call to the specified contact.

For more information on launching an app with a URI, see Launch an app with a URI.

iOS and Android protocol activation

The Dynamics 365 Remote Assist mobile application supports the two protocol activation methods:

  • “ramobile” is used when Remote Assist mobile is known to be installed on the device already.
  • "https://call.d365ra.com/link.html" is used if Remote Assist mobile is not confirmed to be installed on the device already.

The argument schema for both methods accepts an optional contactSearch field, which is a JSON-formatted array of strings to use for finding a contact.

{ "contactSearch":[ "supportContact@microsoft.com"] }

Example

For this example, we will perform a contact search. We need to include the contactSearch parameter, which is an array of search strings.

  1. First we form a JSON string:
	{
      "contactSearch":[
        "Jill Smith",
        "jillsmith@microsoft.example"
      ]
    }
  1. Encode the JSON string in base64. ewogICJjb250YWN0U2VhcmNoIjpbCiAgICAiSmlsbCBTbWl0aCIsCiAgICAiamlsbHNtaXRoQG1pY3Jvc29mdC5leGFtcGxlIgogIF0KfQo=

3a. To use the "ramobile:" method, append the base64 encoded string to "ramobile:" to form the new URI. "ramobile:ewogICJjb250YWN0U2VhcmNoIjpbCiAgICAiSmlsbCBTbWl0aCIsCiAgICAiamlsbHNtaXRoQG1pY3Jvc29mdC5leGFtcGxlIgogIF0KfQo=";

When this link is selected, Remote Assist mobile will launch and search for the provided contact details and provide results to the user.

3b. To use the https deeplink method, append the base64 encoded string as a value to the 'd' key. "https://call.d365ra.com/link.html?d=ewogICJjb250YWN0U2VhcmNoIjpbCiAgICAiSmlsbCBTbWl0aCIsCiAgICAiamlsbHNtaXRoQG1pY3Jvc29mdC5leGFtcGxlIgogIF0KfQo=";

When this link is selected and Remote Assist mobile is not installed a web browser will open, prompting the user to install Remote Assist mobile. Once installed, the user can click on another button to launch Remote Assist mobile and search for the provided contact details and provide results to the user. If Remote Assist mobile is already installed, Remote Assist mobile will launch and search for the provided contact details and provide results to the user.

Note

Can you tell us about your documentation language preferences? Take a short survey.

The survey will take about seven minutes. No personal data is collected (privacy statement).