Mahdi Ghiasi
Mahdi Ghiasi

Reputation: 15311

Launching Music app from code

I want to know if there's any way to navigate user to default music app of Windows Phone?

I mean, in Windows Phone 8 it should launch music+videos hub, and in Windows Phone 8.1 it should launch Xbox Music app.

(I prefer to navigate to Now Playing page directly. But even a way to just navigate to that app is better than nothing.)

Please even if you know a method that works with just one of OS versions (8, 8.1) share it with me.

Upvotes: 2

Views: 322

Answers (1)

Romasz
Romasz

Reputation: 29792

You should be able to launch it with the code:

await Windows.System.Launcher.LaunchUriAsync(new Uri("xboxmusic:"));

If you want to launch Nokia Music then:

await Windows.System.Launcher.LaunchUriAsync(new Uri("nokia-music:"));

Some references: SO answer and this nice blog post from Matt Lacey.

Upvotes: 2

Related Questions