Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm writing a program that depends on the camera. I need to test how my program reacts when the camera is not present or disabled.

Is there a way to turn it off completely?

share|improve this question
1  
Well, you could always take a Sharpie™ to the lens. Honestly you'd probably need a custom ROM to do that. –  Al E. Jan 6 '12 at 2:01
2  
A little bit more context is probably helpful here, what are you really trying to do? Why just never starting the camera app doesn't cut it? Do you have concern that malicious apps might attempt to use the camera without your consent or do some bug in the camera stack causes Android to crash? Then you're asking the wrong question. A little context would be needed to find the best solution for your problem. –  Lie Ryan Jan 6 '12 at 2:51
    
Made an edit to try to clarify. Let me know if it needs more clarification. –  Dustin Kendall Jan 9 '12 at 18:03
1  
If your application requires a camera, you should use the android manifest to declare that your app requires it. This will prevent the app from being displayed in the market on devices which don't have a camera. –  Wesley Wiser Jan 9 '12 at 18:52
add comment

1 Answer

If you have root access on your device and just denying access to the camera is enough, you can try an app like Permissions Denied to disable the permission for your app to read the camera.

If you are comfortable with taking apart your phone, it looks like the camera cable could be physically disconnected without going too far into the device, according to this teardown.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.