I have a Xamarin Forms Android app that I'd like to use to open another app (a support session within the ScreenConnect app). Here's code I found on Stack Overflow that I'm trying to use.
StartActivity(new Android.Content.Intent(Android.Content.Intent.ActionView, Android.Net.Uri.Parse("intent://instance...screenconnect.com...")));
However, I keep getting the following exception every time. I have seen some things that say that exception can be caused by there not being an appropriate app available, but the ScreenConnect app is definitely installed and available for use.
Android.Content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW }
I also found code like this on Stack Overflow but with same exception when I tried it.
var urlString = "intent://instance...screenconnect.com";
var intent = new Android.Content.Intent(Android.Content.Intent.ActionView, Android.Net.Uri.Parse(urlString));
intent.AddFlags(ActivityFlags.NewTask);
intent.SetPackage("com.android.chrome");
try {
StartActivity(intent);
}
catch (ActivityNotFoundException ex) {
//Chrome browser not installed
intent.SetPackage(null);
StartActivity(intent);
}