Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera permission is not turned on?? #122

Open
clarklight opened this issue Jun 6, 2023 · 1 comment
Open

Camera permission is not turned on?? #122

clarklight opened this issue Jun 6, 2023 · 1 comment

Comments

@clarklight
Copy link

I am testing this on Android
Have the below in the config.

 	<config-file target="AndroidManifest.xml" parent="/manifest">
		<uses-permission android:name="android.permission.CAMERA" />
 	</config-file>

When i run the demo code

permissions.requestPermission(permissions.CAMERA, success, error);

function error() {
  console.warn('Camera permission is not turned on');
}

function success( status ) {
  if( !status.hasPermission ) error();
}

Then it return Camera permission is not turned on.
I am just running on a blank demo Cordova app.

Any pointers?
Clark

@clarklight
Copy link
Author

i figured it out, the deprecated API requestPermission seems to work, but when i used the multiple permissions doesn't seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant