Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Is there any View Custom Renderer example that compactible with the current Android's Camera2 API ?

ElementalCElementalC USMember ✭✭

Looking at the View Custom Renderer example in the Xamarin's GitHub, while the example for creating the custom renderer is still valid, the given example for camera access for the Android platform is outdated, i even haven't checked the iOS's and UWP's side

Then, looking on to Xamarin.Android's "Basic Example" for Camera2 access, shows that the current version of Android's Camera API is changed too much, so much that it looks so 'alien' compared to the previous one. The needs of fragment, different classes for each of the callback, overloads here and there, and the list goes on. So difference, that some might finds all of those things, the Custom Renderer and the Camera API, is no longer compatible each other.

So, with all that being said. Is there any simple, not-overly-complex example on how to access Camera2 in Android on a exportable native view (ViewRenderer) for Xamarin.Forms View ?

Thank you


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    There are 45 results when searching the forum for Camera2
    Do none of them really not already cover this?

  • StryffeStryffe USMember ✭✭

    @ElementalC In case you still need it, I found a really simple solution for Android here using Camera2 instead of Camera for embedding a live Camera View inside an app. The iOS version can be found here. Works well for me so hope it helps others as well!

  • vasilytserejvasilytserej USMember ✭✭

    I created I xamarin forms sample with Camera2. Check it out.

  • ElementalCElementalC USMember ✭✭

    Thanks guys for your answer, sorry for my super-duper late response.

    @Stryffe, @vasilytserej thanks for the sweet examples, i'm going to dive more to the example you guys has sent here, +1 for the iOS example. How you guys know i also needed it ? :o

    @ClintStLaurent, sorry if i do looks lazy or some sort, but at the time this question was posted, there wasn't any quite example that land on the 'sweet-spot' i'm looking for, sort of, so that's why i'm ended up asking. Once again, sorry.

Sign In or Register to comment.