Open play store app

Hi All,

How can I open my other play store app when button click? Any ideas?

Thanks

https://stackoverflow.com/questions/3343432/how-do-i-programmatically-launch-a-specific-application

1 Like

Hi TheKelsam, Thanks for your quick reply. I think this example shows how to open already installed app. In my case I want to open my other app in Playstore.

Ah, then this is all you need:

_ = Microsoft.Maui.ApplicationModel.Browser.OpenAsync("https://play.google.com/store/apps/details?id=net.kelsam.partywords", Microsoft.Maui.ApplicationModel.BrowserLaunchMode.External);

If the link you provide is a Google Play app (like the one in the example), it will be opened using the Google Play app instead of a web browser.

Note: if you’re using MonoGame 3.8.1, you will need <UseMauiEssentials>true</UseMauiEssentials> in your .csproj. If you’re using an earlier version of MonoGame, you’ll need Xamarin Essentials instead (and will need to look up the “open browser” function within Xamarin docs).

1 Like

Trying this worked fine in the emulator but on my Phone (Android 13) i got a NotSupportedOptionException.

changing Microsoft.Maui.ApplicationModel.BrowserLaunchMode.External to Microsoft.Maui.ApplicationModel.BrowserLaunchMode.SystemPreferred worked for me.

Check this post. I have explained how to solve this
https://mycodingerrors.blogspot.com/2023/10/how-to-open-app-in-google-play-store.html