I have one app in which i am using barcode scanner, so i can't completely disable the camera. but i don't want camera to capture photos. I want camera in read only mode.

Basically i want to restrict user from taking photos.

So is there any way to achieve this. My device is rooted, so i can i modify the code of system's camera or is there any OS level setting or any app available.

Any Helpwill be appreciated! ThankYou!!

1 Answer 1


You could consider using an app locker, e.g. Smart AppLock (App Protector). Photos are taken by the camera app, regardless of whether you invoke it from the app drawer, a shortcut, widget, or via pressing the camera button. So if you lock the camera app (and the playstore app, so the user doesn't simply install an alternative camera app -- also make sure to disable and lock the settings app), only somebody knowing the password/pattern you've set up to protect those apps can use them.

Explanation: While blocking access to the camera app, this does not affect the barcode scanner. The barcode scanner for sure accesses the camera hardware, but not the camera app: the latter would not know what it aquires (just that it focusses on "something", but it's not recognizing what this "something" is and so would not know whether it aquired a barcode correctly). You can also verify this by checking the permissions the barcode app asks for: its permission list will for sure include Hardware controls: Take pictures and videos, which means it accesses the hardware directly. For accessing it via another app (e.g. the camera), it would not need this permission but rather call that app via an "intent" (see: what is intent in android?), so that called app would do the intended action.

  • I can not lock the camera app, beacause i want my other user to use my App which itself uses 'Barcde scanner' app, So if i lock my camera then user can't even use that app also. Commented Apr 24, 2013 at 6:31
  • Does the barcode scanner app invoke the camera app? I never heard that. Have you tried?
    – Izzy
    Commented Apr 24, 2013 at 7:24
  • oh great! I think problem solved.. The barcode scanner app doesn't access the system camera.. So i can lock my system camera. Commented Apr 24, 2013 at 9:14
  • 1
    Well, it accesses the camera hardware for sure, but not the camera app. Simply take a look at the barcode scanner app's permissions: it wouldn't need the camera permission if it would call the camera app via an intent instead. Also, how should the camera app know whether it successfully aquired a barcode? It has not the necessary features for that :) So: Glad your issue has been solved!
    – Izzy
    Commented Apr 24, 2013 at 9:19
  • You are GREAT!!! Commented Apr 24, 2013 at 9:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .