Home:ALL Converter>Phonegap prompt for permission

Phonegap prompt for permission

Ask Time:2015-06-25T16:19:37         Author:ApheX

Json Formatter

Is there a way on Phonegap to manually prompt for a permission?

Example:
My app needs to access the device's contacts. So at first launch (on iOS), there is a popup asking the user to allow or deny the app to access contacts. If the user denied permission, the popup will never show up again and the app will be unusable. So I need to consider two things:

  • Is there a way to get the current state of a permission? (i.e "is the app have permission to access contacts?")
  • Is there a way to prompt user again for permission?

Author:ApheX,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/31044855/phonegap-prompt-for-permission
yy