how to update camera class to Camera2 in a xamarin project

AndoProgrammer 21 Reputation points
2022-10-25T16:25:18.387+00:00

I'm working on a xamarin project. Actually, the code of the project was written in an old version and its target android version was android 9 i.e Pie. Now I want to update the target version to android 13 and I'm having a lot of warnings that are telling me that the Camera class is obsoleted. The newer version of the class is Camera2 which has completely different methods than Camera. There are some other classes as well which are obsoleted. I want these classes to be replaced with newer ones. Please guide me on what to do so that I can fix this issue.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,293 questions
{count} votes