Search code examples
windows-phone-8dailymotion-api

Auto-launching DailyMotion Windows Phone from another App


I have read about Auto-launching apps from another app on Windows Phone. I have a app that shows some videos, these videos are mainly from DailyMotion. Now my Question is if there is any possibility to check, if DailyMotion App is installed on my Phone, than open this video in this DailyMotion app instead of browser.


Solution

  • You can use custom URL to launch the dailymotion app. For example, using the line of code

    string dailyUrl = "dailymotion://myurl";
    Windows.System.Launcher.LaunchUriAsync(new Uri(dailyUrl));
    

    It will automatically open the dailymotion app if it is installed on the phone, but otherwise it will probably perform nothing. So with the previous answer explaining how you might check if the app is installed, and this piece of code, you might be able to perform what you need :)