android - W/CameraBase﹕ An error occurred while connecting to camera: 0 on camera.open() call -



android - W/CameraBase﹕ An error occurred while connecting to camera: 0 on camera.open() call -

i'm writing photographic camera app , whenever phone call camera.open() app crashes , error:

w/camerabase﹕ error occurred while connecting camera: 0

here how i'm opening camera:

public void getcamerainstance(){ mcamera = null; seek { mcamera = camera.open(); // effort photographic camera instance } grab (exception e) { // photographic camera not available (in utilize or not exist) } }

update:

if reading please note original photographic camera api , no longer applies the latest version of photographic camera api (camera2).

you should utilize camera2 api point onwards has greater functionality , has improve image processing pipeline.

to utilize next method

android.hardware.camera.open(int cameraid)

you should pass cameraid, if want front end photographic camera id can utilize next method

private int findfrontfacingcamera() { // search front end facing photographic camera int numberofcameras = camera.getnumberofcameras(); (int = 0; < numberofcameras; i++) { camerainfo info = new camerainfo(); camera.getcamerainfo(i, info); if (info.facing == camerainfo.camera_facing_front) { cameraid = i; camerafront = true; break; } } homecoming cameraid; }

if same photographic camera opened other applications, throw runtimeexception.

you must phone call release() when done using camera, otherwise remain locked , unavailable other applications.

your application should have 1 photographic camera object active @ time particular hardware camera.

android android-activity android-camera

Comments

  1. Android - W/Camerabase﹕ An Error Occurred While Connecting To Camera:
    0 On Camera.Open() Call - >>>>> Download Now

    >>>>> Download Full

    Android - W/Camerabase﹕ An Error Occurred While Connecting To Camera:
    0 On Camera.Open() Call - >>>>> Download LINK

    >>>>> Download Now

    Android - W/Camerabase﹕ An Error Occurred While Connecting To Camera:
    0 On Camera.Open() Call - >>>>> Download Full

    >>>>> Download LINK 37

    ReplyDelete

Post a Comment

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -