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

This plugin not working with Android 6.0 #16

Open
sarunkumar1990 opened this issue Jul 22, 2016 · 2 comments
Open

This plugin not working with Android 6.0 #16

sarunkumar1990 opened this issue Jul 22, 2016 · 2 comments

Comments

@sarunkumar1990
Copy link

No description provided.

@rolinger
Copy link

I concur...I think the plugin is broken in Android 6x. It was working previously before my phone was upgraded to 6.0 - I was able to collect the Android phone info and store but it no longer seems to work.

 var deviceInfo = cordova.require("cordova/plugin/DeviceInformation");
deviceInfo.get(function(result) {
   var phoneNumber = JSON.parse(result.phoneNo) ;
   console.log("Working: "+phoneNumber) ;
}, function(error) {
   console.log("Not able to retrieve number") ;
}

months ago it would print the phoneNumber when I was on Android 5x...in fact, my app still had the data stored...but then I ran that section of code again and now it just prints the error message.

@rolinger
Copy link

plugin is not broken, its a permissions issues, you will need to add:

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

to the AndroidManifest.xml file

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

2 participants