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

The error callback is "JSON error" #14

Closed
Jonexuan opened this issue Sep 20, 2016 · 2 comments
Closed

The error callback is "JSON error" #14

Jonexuan opened this issue Sep 20, 2016 · 2 comments

Comments

@Jonexuan
Copy link

I use your plugin like this,
var success = function(data){ console.log(data,'success') }
var error = function(data){ console.log(data,'error') }
......
var permissions = cordova.plugins.permissions; permissions.requestPermissions(permissions.ACCESS_COARSE_LOCATION,success , error);

and i got the error "JSON error error",

Could u please tell me how to slove it?

@nitinmesta
Copy link

permissions.requestPermissions(permissions.ACCESS_COARSE_LOCATION,success , error);

change this line to

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

as you are requesting for single permission.

@WuglyakBolgoink
Copy link

hi @Jonexuan solved problem? close the ticket)

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

3 participants