2

Reading about the launcher it gives the example of starting the Lyft app by doing something like:

await Launcher.Default.OpenAsync("lyft://ridetype?id=lyft_line");

I can't find examples for doing something with the app store or google play store like:

await Launcher.Default.OpenAsync("appStore://app?id=1234567");

Is this even a thing?

Cef
  • 661
  • 1
  • 6
  • 26

1 Answers1

1

Yes. You can try to use Launcher to open another app and determine if the app can be opened by CanOpenAsync method (If not, open Playstore or AppStore, you should know the redirection link to Google Play store or Apple AppStore.)

For example, you want to launch Microsoft Word with AppStore.

1.Get the deep link for the Microsoft Word https://apps.apple.com/us/app/microsoft-word/id586447913 via app-store

2.And then you can launch it via below code:

bool launcherOpened = await Launcher.Default.TryOpenAsync("https://apps.apple.com/us/app/microsoft-word/id586447913");

if (launcherOpened)
{
    // Do something fun
}
Alexandar May - MSFT
  • 6,536
  • 1
  • 8
  • 15
  • 1
    Nice. I assumed that the link would be different format than https:// because of the example but i used my same app link and it goes direct to the app store instead of Chrome then the App Store. Thanks – Cef Mar 02 '23 at 05:17