Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Avoiding application to be closed when no camera (Android)

Hello,

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

click to hide/show revision 2
retagged

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

berak gravatar image

Avoiding application to be closed when no camera (Android)

Hello,

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

click to hide/show revision 3
retagged

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

berak gravatar image

Avoiding application to be closed when no camera (Android)

Hello,

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