Avoiding application to be closed when no camera (Android) [closed]

asked 2017-09-03 20:25:34 -0500

aruno14 gravatar image

updated 2017-09-03 23:40:17 -0500

berak gravatar image


I made an android application using Opencv. The application used camera but for test I also use pictures. I would like to test my application on the android emulator (without camera), but if I do I got the message "It seems that you device does not support camera (or it is locked). Application will be closed.". I understand the message and it is true, but why opencv closed my application ? I can use picture if the camera is not available. I would like to catch the error and to do something by myself, like give localized explanation of the error. So my question is simple is: How to avoid application be closed by opencv ?

Thank you

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by aruno14
close date 2017-10-02 02:48:03.594154



Where is the code executing Camera capture ?

Ziri gravatar imageZiri ( 2017-09-03 22:44:16 -0500 )edit