Jobse
Jobse

Reputation: 174

open app url scheme without option to go to store if not available windows phone 8

On IOS and Android it's easy to detect wether a certain app is installed or not. Microsoft is not as friendly for developers and denies the access to information about other apps.

So when launching an url scheme on WP like:

 Windows.System.Launcher.LaunchUriAsync(new system.Uri("myApp:MyParams"));

This would open a dialog you can either cancel or "go to store to download the app".

I would like to get a result where this dialog is never shown when the app is not installed and when it is installed the app just opens.

So can anyone help me with that? (of course more ideally would be an availability check but that's not gonna happen so)

Upvotes: 0

Views: 805

Answers (2)

Paweł Kanarek
Paweł Kanarek

Reputation: 2637

You can also call method Windows.System.Launcher.LaunchUriAsync with LauncherOptions param.

LauncherOptions.preferredApplicationPackageFamilyName Is set to the package family name of the app in the store that you want to recommend.

LauncherOptions.preferredApplicationDisplayName Is set to the name of that app LauncherOptions.

You must set both of these options to recommend an app. Setting one without the other will result in a failure.

Upvotes: 0

Igor Kulman
Igor Kulman

Reputation: 16361

Not possible in 8.1, you have to wait for 10 where there is more functionality provided for Launcher.LaunchUriAsync.

Upvotes: 2

Related Questions