Android Question Replace camera with image file

Melghost

Member
Licensed User
Longtime User
Hi.
Is there a way to replace the camera capture with an image from a file?
The goal is to show an image of a static warning: "You're not allowed to use the camera"
I would need it to work no matter the camera app being used.

Thank you.
 

drgottjr

Expert
Licensed User
Longtime User
about as close as you can come would be to use the device administrator api
to disable the camera on the device. but the user herself must submit to the
treatment by enabling it. otherwise, you can't stop people from using apps
to which they have granted camera access. and if you disable the camera in
device settings (which has to be done by the user, not you), the first time she tries
to run an app that accesses the camera, the system kindly offers to enable the camera...
(spoiler: if she says yes, the camera is back up and running again.)

you'd be better off simply dabbing a drop of black paint on the devices camera lens(es)
or tapping a small hole in the lens with a tiny auger
 
Upvote 0

Melghost

Member
Licensed User
Longtime User
about as close as you can come would be to use the device administrator api
to disable the camera on the device. but the user herself must submit to the
treatment by enabling it. otherwise, you can't stop people from using apps
to which they have granted camera access. and if you disable the camera in
device settings (which has to be done by the user, not you), the first time she tries
to run an app that accesses the camera, the system kindly offers to enable the camera...
(spoiler: if she says yes, the camera is back up and running again.)

you'd be better off simply dabbing a drop of black paint on the devices camera lens(es)
or tapping a small hole in the lens with a tiny auger
Thank you
 
Upvote 0
Top