Does my phone have a front camera AND / OR microphone?

I am creating an application that should know these answers:

Does the device have a front camera?

Does the device have a microphone?

Is there a bool value that I can use to check? I will not use them correctly, but I plan to use them in the near future, so I am trying to include them.

What I tried:

Google search

Search Stackoverflow for Similar Questions

Search answer.yahoo.com

+4
source share
1 answer

You can use IsCameraTypeSupported :

if(PhotoCamera.IsCameraTypeSupported(CameraType.FrontFacing)) Debug.WriteLine("Front Facing camera exists"); 

There are currently two enumerations for CameraType ( Primary and FrontFacing )

All phones have a microphone, so you do not need to check this.

+7
source

Source: https://habr.com/ru/post/1391018/


All Articles