We would like to build an app in Xamarin for ios and android. In this app we would like to show a button only if the Outlook app exists on the device. How can I check if the Outlook app exists on the device?
You could use Dependency Service and implement it on specific platform.
Use canOpenURL(_:) to check if that app is installed on the device. If it returns true, means the app is installed , but first you have to know the url scheme of that app, e.g ms-outlook:// .
if(UIApplication.SharedApplication.CanOpenUrl(new NSUrl(new NSString("ms-outlook://"))))
Use PackageManager and PackageInfo to check if any app is installed .
Details refer https://stackoverflow.com/a/47547382/8187800 .
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies