Access Denied Finding Property "Camera.Hal1.Packagelist"

Access denied finding property 'camera.hal1.packagelist' error thrown when open QR Scanner Intent on LG V30?

After a lot of deliberation and a lot of experimentation, I have found a solution to this problem. The solution seems to come from a new declaration of the IntentIntegrator Class every time the QR Scanning Button is clicked. By this, I mean that the access to the camera is granted using the following line

new IntentIntegrator(MyActivity.this).initiateScan();

From my understanding, declaring the optional parameters of the object's instantiation explicitly (i.e. setBeepEnabled and so on) is causing the problem, and therefore denies the application permission to actually use the camera, even though permissions to the hardware have already been granted beforehand.

Building on this, the optional parameters should be declared and set within the IntentIntegrator declaration, and not explicitly on different lines. This way, the application still retains access to the camera hardware, but can now cater for other optional parameters and features. By this, I mean the parameters should be specified as the following:

new IntentIntegrator(MyActivity.this).setBeepEnabled(false).initiateScan();

This fix appears to work on all dual camera setups

Access denied for property vendor.camera.aux.packagelist

First, check your Android version. If it is running on Android 6.0 and higher (API level 23+), then you need to :

Declare a permission in the app manifest. Make sure to insert the permission above the application tag.

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />

<application ...>
...
</application>

Then, request that the user approve each permission at runtime

if (ContextCompat.checkSelfPermission(context, Manifest.permission.CAMERA) != 
PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.CAMERA},
50); }

Android - Camera 2 API - won't take picture

I don't know about the exact scenario of yours but in most cases, this happens if not running in the right thread. For example, just running mediaRecorder.start() will cause a similar error but putting media recorder to run on UI thread solves this issue.

runOnUiThread(
new Runnable() {
@Override
public void run() {
mediaRecorder.start();
}
});

But as I said this is once scenario, and there could be other scenarios also for the issue.

Hopefully it will help someone.



Related Topics



Leave a reply



Submit