Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Trick or Treat – URI Associations In Windows Phone 8 Outside Bing Vision

DZone's Guide to

Trick or Treat – URI Associations In Windows Phone 8 Outside Bing Vision

· Mobile Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

With the release of the new Windows Phone 8 SDK, the developers are now able to create URI associations, where their application can be launched from the context of another application. For example, I can register a den: URI scheme to pass specific information to my application from any other installed application or resource, such as an email or a text message. That way, my application is no longer a standalone entity and it can interact easily with other applications in the Windows Phone ecosystem.

There is one interesting aspect, however. Custom URI schemes are not recognized by Bing Vision, which might be a problem if you generated a QR code that should launch your application. You will be able to launch http:// URLs, but custom applications will remain in their separate frame, out of reach of the stock app.

Although this might seem like an issue, it can easily be mitigated by using standard HTML redirect. Since Bing Vision correctly handles URLs, and Internet Explorer on Windows Phone supports redirects, you have a couple of options, one of them suggested by Nikola Metulev.

Have the user navigate to a URL that will redirect to the custom URI schema. Create a HTML page, that has the following source:

<HTML>    <HEAD>        <META HTTP-EQUIV="refresh" CONTENT="1;URL=den:test">    </HEAD>    <BODY>    </BODY></HTML>

What will happen here is when the user will navigate to this page from a Windows Phone, he will get redirected to the custom URI that was specified as the redirect target. It is not possible to enter custom URLs that do not follow the HTTP format in the Internet Explorer address bar, but you can still rely on content links and redirects. Of course, you could also use a third-party URL shortening web service that supports custom URI schemas, such as is.gd. You can shorten an URL and have a QR code automatically generated. That URL can be something like den:awesome, and from it you will obtain a valid HTTP URL that will then trigger the application launch.

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}