I want to implement a functionality to capture image through front camera when someone tries to unlock my device and enter incorrect password 3 times. I checked that it is possi
I'm not sure this will work on other devices, but if it does it might offer some insight into whats happening.
In the Camera.Parameters, there is a feature to save the raw bayer image directly to the SD card. This image happens before the .jpeg file is created, so if the operating system is blanking out the image, this image might not be effected.
Camera.Parameters parameters=camera.getParameters(); parameters.set("rawsave-mode", "1"); parameters.set("rawfname", "/mnt/sdcard2/test5.raw"); camera.setParameters(parameters);
If this feature works on your device, you should be able to determine if the picture is being taken and wiped out or if it not being taken at all.
If the raw image works, it is fairly easy to convert a bayer to an RGB image or grayscale image.
The other area i'd be looking is the logcat information and compare the logs between an unlocked context of the code and a locked context of the code. If there is a security issue, it should be reflected in the logcat.