Can't see live camera on Nexus 7


I’m on the page 315 and can’t see the live camera after pressing the ImageButton to take the picture
However i can see it using this code.

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);

Any ideas how i can do it using your methods?


Since the nexus 7 has only a front facing camera, you’ll need to do a couple of things differently. One, use the feature in your manifest.

I don’t have a 7 handy to test with, but I believe that since it only has one camera, you are still fine calling It may be the case that you need to call, though, to select the front facing camera (this is definitely the case on devices with multiple cameras).


I did those changes , and the CrimeCameraFragment surfaceView is still black,i tried and it crashed, gonna check my code again in case I made some mistake


Have you tried running your code on an emulator with a front-facing camera enabled? Do you get the same result?


it was something on my code i guess,couldn’t find out what exactly even though i checked several times, but it worked with pasting the CrimeCaremraFragment for 19th chapter solution