java - Android Rear Facing Camera Take Photo without preview -


i have followed tutorial lars vogel @ tutorial link

while tutorial works front facing camera unfortunately cannot rear camera take photo. getting late , i'm missing simple. code is:

private int findbackfacingcamera() {     int cameraid = 0;     // search facing camera     int numberofcameras = camera.getnumberofcameras();     (int = 0; < numberofcameras; i++) {         camerainfo info = new camerainfo();         camera.getcamerainfo(i, info);         if (info.facing == camerainfo.camera_facing_back) {             log.d(debug_tag, "camera found"  + info.facing);             cameraid = i;             break;         }     }     return cameraid; } 

make sure have correct permissions facing camera listed in android manifest.

also, check out question: how open "front camera" on android platform?


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -