Access denied searching for property "camera.hal1.packagelist"

When using the camera in the service, the mobile screen becomes non-touching (blocked by a transparent window) and only below the error occurs

Access denied finding property "camera.hal1.packagelist" 

What will be the reason and its solution? Please, help..

+21
android android-studio android-service android-camera android-camera2
source share
4 answers

I worked with the OpenCV tutorial code for the camera app on Android. I ran into the same error, and after looking at the answers, I really missed one permission.

 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 

Although the application does not save any data externally, without this permission an access denial error occurs. Hope it helps.

+1
source share

I got the same error in my application, I used the surface view and its weight was set to zero. I changed it back to 1 and the error was fixed. Check your XML code, this may help.

0
source share

Please see if you are asking for camera permission from the user. Just specifying permission in the manifest will not work above a certain level of Android.
This will solve your problem.

To request permission, follow this link .

0
source share

I had the same problem with Camera 1 API on my test device "LG V30". I found that this message ( Access denied finding property "camera.hal1.packagelist" ) appeared when I opened the camera as follows:

 int numberOfCameras = Camera.getNumberOfCameras(); CameraInfo cameraInfo = new CameraInfo(); for (int i = 0; i < numberOfCameras; i++) { Camera.getCameraInfo(i, cameraInfo); if (cameraInfo.facing == CameraInfo.CAMERA_FACING_BACK) { camera = Camera.open(i); cameraId = i; } } 

The important thing is that this happened only for the LG V30, which has 2 rear cameras ( numberOfCameras=3 ).

After some testing, I found out that this works for this device:

 /** A safe way to get an instance of the Camera object. */ public static Camera getCameraInstance(){ Camera c = null; try { c = Camera.open(); // attempt to get a Camera instance } catch (Exception e){ // Camera is not available (in use or does not exist) } return c; // returns null if camera is unavailable } 

The above code example will refer to the first backward-facing camera on a multi-camera device. Here you can find a detailed description.

0
source share

All Articles