askForAllPermissions method

Future<void> askForAllPermissions()

Asking for all permissions needed for the included sampling packages.

Should be called before sensing is started, if not already done as part of configure.

Implementation

Future<void> askForAllPermissions() async {
  if (SamplingPackageRegistry().permissions.isNotEmpty) {
    info('Asking for permission for all measure types.');
    _permissions = await SamplingPackageRegistry().permissions.request();
    permissions.forEach((permission, status) =>
        info('Permissions for $permission : $status'));
  }
}