if (rationale) {
      const shouldShowRationale = await NativeModules.PermissionsAndroid.shouldShowRequestPermissionRationale(permission);

      if (shouldShowRationale) {
        return new Promise((resolve, reject) => {
          NativeModules.DialogManagerAndroid.showAlert(
            rationale,
            () => reject(new Error('Error showing rationale')),
            () => resolve(NativeModules.PermissionsAndroid.requestPermission(permission))
          );
        });
      }
    }
Prompts the user to enable a permission and returns a promise resolving to a
string value indicating whether the user allowed or denied the request

If the optional rationale argument is included (which is an object with a
`title` and `message`), this function checks with the OS whether it is
necessary to show a dialog explaining why the permission is needed
(https://developer.android.com/training/permissions/requesting.html#explain)
and then shows the system permission dialog