I figured it out.
var uri = "https://play.google.com/store/apps/details?id=com.udemy.com";
if (await Xamarin.Essentials.Launcher.CanOpenAsync(uri))
await Xamarin.Essentials.Launcher.OpenAsync(uri);
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a published app and in that app the user gets a notification when a new version is available. I created a button that when clicked the users is supposed to get redirected to the App Store or Google Play to that app so that he/she can update the app.
I found this code but I am getting the following error.
Device.OpenUri(new Uri("market://details?id=com.udemy.android"));
BTW, the URI is valid
Error Message:
Thank you in advance.
I figured it out.
var uri = "https://play.google.com/store/apps/details?id=com.udemy.com";
if (await Xamarin.Essentials.Launcher.CanOpenAsync(uri))
await Xamarin.Essentials.Launcher.OpenAsync(uri);
Hello,
Welcome to Microsoft Q&A!
You can use latestversionplugin , this plugin helps to easily detect if you are running the latest version of your iOS, macOS, Android, or Windows app and open it in the App Store, Play Store, or Microsoft Store to update it.
using Plugin.LatestVersion;
var isLatest = await CrossLatestVersion.Current.IsUsingLatestVersion();
if (!isLatest)
{
var update = await DisplayAlert("New Version", "There is a new version of this app available. Would you like to update now?", "Yes", "No");
if (update)
{
await CrossLatestVersion.Current.OpenAppInStore();
}
}
Thank you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.