I am working on audio/video chat application. When the camera which I want to use is used by another applcation I want to promt a message but issue is that camera didn't have any property which shows that it is used by another application.
Please help me if anybody knows the solution.
Thanks and Regards:
one cannot. Application runs in black box and does not know a lot of things. So when "getCamera" is returning null there are dozens of possible reasons: use by other application is one of them and other includes camera not being plugged in, camera being plugged in but not switched on, etc.
I think that checking Camera.names" length will ensure that there is at least one enabled camera input on system btw. Showing security panel for Camera could let user to make correction in what camera is to be used by runtime, etc.
I suspect that the message "Unable to access camera. It may be in use by another application or not present at all." , or similar, will do the trick.