Hi all I have some trouble with ionic and Android M. I need to access to the account saved on the device(like facebook and google). I use cordova-plugin-contact and cordova-device-accout.
All it work on the old version of android but on the >=6.0 the permission alert not work. it is possible to enable permission only in settings of the devices.
in AndroidManifest.xml i add all permission :
Yes the plugin add all the permission but when i try it on a device the app not show the runtime permission popup.
Infact in settings of the devices the app have the contact permission disabled and it work only when i turn on the permission.
Is there a way to force the open of runtime permission popup for grant the contact permission?
Ideal case, Plugins should implement the runtime checks for permissions needed on 6.0 and above. For now you can use this plugin to check if you have access to permissions required before calling methods from contacts plugin.
Well the problem is not with the plugin but with the Android 6 security patch update.
According to it the user has to give the permission for all the installed apps manually by going to Settings > Apps > [Name of the app] > Permissions.
Even though the permissions are added in the manifest but it would not appear to be actually granted for Android 6.x
It would work flawlessly for iOS and other android devices.
Yeah. it doesn’t solve your problem but you now know what the problem actually is.
Hope it helped.
Yeah! We are trying that plugin and it seems it is working for android. We have a iOS issue though, not building using XCode 7 EVEN after removing the plugin :-S. Mind this point, maybe you are right on using XCode 8… but I’m pretty afraid about the bugs/wrong feats it could have. We will go on investigating about it, as it is (pretty) weird.
Hi again
Thanks for the snippet, we can pay a review to our code in the case we can improve it, but I guess more or less our code is pretty much the same.
Our previous issue was “deeper”, in the end we ended up removing and adding ios platform as it seemed something must stay (hard) in cache, xcode or something, rejecting to do a right build once and again. Replacing the platform and the plugins, installing the proper diagnostics 3.1.x plugin worked.
Hey guys! @Abhay1415, @telekosmos
Have you tried the cordova diagnostic plugin on older android versions or I have to choose between API 16-22 and API 22+?
Hi @Meruem!
If your build on playstore is having version 16-22, things will be fine for all the versions, If you have updated the version to 23 and submitted a build on playstore, you can’t roll back.
You will have to use cordova diagnostic plugin to support Android 6 version.