you can try this;
private async void Button_OnClicked(object sender, EventArgs e)
{ //You need to change your app package address which you want to open with button. Example: "com.microsoft.office.officelens"
Intent intent = new Intent();
intent.SetComponent(new ComponentName("com.package.address", "com.package.address.MainActivity"));
Android.App.Application.Context.StartActivity(intent);
}
Also, if you want to check user downloaded or didn't download this app;
public string facebookApp;
public async Task ShowAlert()
{
this.facebookApp = "https://play.google.com/store/apps/details?id=com.facebook.katana&hl=tr";
var action = await DisplayAlert("Warning", "Please download facebook app first.", "Okay", "Cancel");
if (action)
{
Device.OpenUri(new Uri(this.facebookApp));
}
}
private async void Button_OnClicked(object sender, EventArgs e)
{
try
{
Intent intent = new Intent();
intent.SetComponent(new ComponentName("com.package.address", "com.package.address.MainActivity"));
Android.App.Application.Context.StartActivity(intent);
}
catch (Exception ex)
{
ShowAlert();
}
}
So, in this case; if the user didn't download xApp(facebook, twitter, etc.) before, he/she will get a warning. If they click Okay on DisplayAlert, the program will send them to Google Play link.