Hello,
If you want to scan QR code in Xamarin Forms using the Native API, you can do it by using this way:
- First we need to find a Xamarin Wrapper to use native APIs on Android and iOS:
iOS: you can use this CIDetector.CreateQRDetector to recognizes QR codes. Android: Based on this google doc we can use ML Kit to recognize and decode barcodes in Android Application. In Xamarin ML Kit is wrapped in the Xamarin GooglePlay Services: Xamarin.Google.MLKit.BarcodeScanning. UWP: You can use this BarcodeScanner API directly.
2. Then you can use DependencyService to enable Xamarin.Forms applications to invoke native platform API.
For how to use DependencyService, please check:
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/dependency-service/introduction.
Thanks,
Amy Peng