How can I scan QR code in Xamarin Forms using the Native iOS and Android and without having to use a thirdparty tool?
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:
9 people are following this question.