DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. App URI Handlers in UWP Apps: Open Your Website With Your App

App URI Handlers in UWP Apps: Open Your Website With Your App

If you have a website and an app you might want people navigating to your website on a device with the app installed to instead go straight to the app. Matt Lacey has some advice for you!

Matt Lacey user avatar by
Matt Lacey
·
Oct. 24, 16 · Opinion
Like (3)
Save
Tweet
Share
4.20K Views

Join the DZone community and get the full member experience.

Join For Free
All this month, I'm taking some time each day to explore (and document) things that are related to UWP development that I haven't fully investigated or used before. While doing it over lunch each day I'm calling it #UWPLunch.

If you have a website and an app you might want people navigating to your website on a device with the app installed to instead go straight to the app.

If that's what you want it's easy to do.

You just need to tell your app which website. It's just a little addition to the manifest:


Ignore the colored wiggly lines indicate that you need to declare the uap3 namespace alias:

xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"

Also, add it to the IgnorableNamespaces list.

Then you tell the website about the app. Add a file named ' windows-app-web-link' to the root of the site that returns JSON like the following.

  "packageFamilyName": "mrlaceycom_thnpmr8zdxbza",

  "paths": [ "*" ],

  "excludePaths" : [ "/about*" ]

When the app is Activated you can detect being launched this way by checking for activation of the kind  ActivationKind.Protocol and then query the Uri to get the path that would have been viewed on the website.

You'll find more on this and another example at
https://blogs.windows.com/buildingapps/2016/10/14/web-to-app-linking-with-appurihandlers/

app Uniform Resource Identifier

Published at DZone with permission of Matt Lacey, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The Data Leakage Nightmare in AI
  • Web Application Architecture: The Latest Guide
  • Artificial Intelligence in Drug Discovery
  • Three SQL Keywords in QuestDB for Finding Missing Data

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: