Search code examples
ionic-frameworkpermissionsionic3ionic4

How to get permission with a description?


I found on an application that asks permission to use bluetooth with a description of why this is needed. I need to implement this in my application.

n

How to name this function? How can this be done on ionic?


Solution

  • This BT request would have to be triggered via a cordova plugin, eg this one for iOS: https://github.com/swetha-thoomoju/cordova-plugin-ios-bluetooth-permissions

    ..or by editing cordova's config.xml to include:

    <config-file parent="NSBluetoothAlwaysUsageDescription" target="*-Info.plist">
        <string>Improve location accuracy when finding nearby services</string>
    </config-file>
    

    The above is only for iOS, but I'm pretty sure something exists for Android as well.