Link your app to Loadkit

Loadkit accepts commands from outside world that makes it possible to link your app to it. For example, you can allow your users to download a file with Loadkit instead of the default app or open a URL in Loadkit Browser. The are a set of commands available to interact with Loadkit, described in this document.

Loadkit Protocol

Loadkit protocol is registered to Windows as loadkit. The following code example shows how to basically launch Loadkit from a C# app through its protocol:

Uri uri = new Uri("loadkit:");
Launcher.LaunchUriAsync(uri);

Add a download

To add a download to Loadkit, use the add command:

loadkit://add/?u=[Encoded Download File URL]

The following code example shows how to launch Loadkit and show the Add Download dialog to the user for a specfic URL:

// Encode the URL
var encodedUrl = System.Net.WebUtility.UrlEncode(
    "http://google.com/images/logo.gif"
);         

// Launch Loadkit
Uri uri = new Uri("loadkit://add/?u=" + encodedUrl);
Launcher.LaunchUriAsync(uri);

Open Loadkit Browser

To open Loadkit Browser, use the browse command, optionally a target URL may be specified:

loadkit://browse/?u=[Encoded URL]

The following code example shows how to launch Loadkit and browse to www.bing.com:

// Encode the URL
var encodedUrl = System.Net.WebUtility.UrlEncode(
    "http://www.bing.com"
);         

// Launch Loadkit
Uri uri = new Uri("loadkit://browse/?u=" + encodedUrl);
Launcher.LaunchUriAsync(uri);