What is Deep linking ?

In the context of the mobile apps, deep linking consists of using a uniform resource identifier (URI) that links to a specific location within a mobile app (i.e. exampleApp://location/123456), rather than simply launching the app (i.e. exampleApp://). Deferred Deep Linking allows users to deep link to content even if the app isn’t already installed. Depending on the mobile device, the URI required to trigger the app may be different (e.g. exampleWindowsApp://location/123456 versus exampleiOSApp://launch?location=123456). Source

How to Perform Deep linking in windows phone 8.1 RT Applications

Just follow the few steps listed below and you are done with the most simplest deep-linking enabled app.

  1. Create a new Windows Phone RT application in visual studio by Ctrl + Shift + N (if visual studio is already running)
  2. Open Package.appxmanifest file from solution explorer and navigate to Declarations Tab.
  3. From the Available Declarations Drop-down menu select “Protocol”.
  4. Now write the name of protocol you want to use to open your application in my case in the figure attached below i have used “sample” so that my application should register itself to open whenever someone taps the uri sample://xyz……Deep_link_2
  5. Now type a blank message or an email starting with the name of protocol e.g sample://test and send it to someone and then tap the link to test if your application auto launch or not.
  6. So till 5th Step you have learned how to auto-launch your application. Now the next task is to pick the query string to populate the data in it to perform various operations in your app.
  7. So now for example from the URI sample://test?value=xyz i want to pick the value of parameter value then i will write a simple logic in C# for it in  protected async override void OnActivated(IActivatedEventArgs args) function inside my App.xaml.cs file as below:
 protected async override void OnActivated(IActivatedEventArgs args)
 Frame rFrame = Window.Current.Content as Frame;
 var param;
 if (args.Kind == ActivationKind.Protocol)
 ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
 var _args = args as ProtocolActivatedEventArgs;
 var ArgsValue = _args.Uri.Query.ToString();

 var value_regex = new System.Text.RegularExpressions.Regex("[?&]value(?:=(?<token>[^&]*))?");
 var value_match = value.Match(ArgsValue);
if (value_match.Success)
 param= value_match.Groups["token"].ToString();




In the code chunk above i have used regular expression to get the parameter value of the parameter named as “value” and have then passed it to the pageToNavigate so that whenever some one taps a URI of kind sample:// it will would navigate to the “PageToNavigate” with parameter according to any logic you want to implement.


Hope you find my blog post informative and interesting. Please Don’t Forget to give feedback or ask questions if you have any confusion. Happy Coding.