NeoLSN / cordova-plugin-android-permissions

This plugin is designed for supporting Android new permissions checking mechanism.
Apache License 2.0
272 stars 174 forks source link

Does this Plugin work with Phonegap Build? #41

Open berrygal opened 6 years ago

berrygal commented 6 years ago

Hello

my app update was rejected by Google due to DEVICE ND NETWORK ABUSE policy violations. I have spent days trying to figure it out and I discovered it's the permissions that are automatically added by Ponegap Build.

I have tried to use this plugin but it is not working. I added the code below as a javascript to my app but nothing.

// JavaScript Document var permissions = cordova.plugins.permissions; var list = [ permissions.ACCESS_NETWORK_STATE, permissions.WRITE_EXTERNAL_STORAGE ]; list.forEach(element => { permissions.checkPermission(element, function(status) { if (status.hasPermission) console.warn("Yes :D -> " + element); else permissions.requestPermission(element, null, null); }, null); });

             is there something wrong with the code? or does this plugin not work with PhoneGap Build?.

please if you've been able to successfully use this plugin on PhoneGap build please can you share how you did it?

thanks

NeoLSN commented 6 years ago

The permissions you asked all are the normal permissions. https://developer.android.com/guide/topics/permissions/normal-permissions.html So you may have another issue.

berrygal commented 6 years ago

Okay, thank u NeoLSN i will check my app's code again. but can you still tell me how to use your plugin with Phonegap Build.

NeoLSN commented 6 years ago

I really don't have idea. I only tested this plugin on cordova platforms.