• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Using CameraX in Xamarin.Android

I am attempting to create my first Xamarin.Android app that uses the camera (I have already written many other apps that do not use the camera). I am writing my app using Xamarin.Android (NOT Xamarin.Forms) & C# (NOT Java). I have found documentation & samples related to Camera2 (Camera2 overview | Android Developers) & CameraX (CameraX overview | Android Developers), however, these were all either using Java or using Xamarin.Forms instead of Xamarin.Android. I would also like to learn to use TextureView to display the preview (although this would be my first time for TextureView as well, so if that is not appropriate for this thread is too complex, it is not the most important topic here). I know how to make all the standard parts of an app, it is just the camera that I need help with. Can anybody help me or recommend a good complete sample or tutorial that includes ALL components (including required NuGet packages, permissions & other things specific to a camera app)? I am also going to mention that I am using Visual Studio 2022 (NOT Android Studio). Thanks.


We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.