private string GetPermissionString(PermissionName permissionName) { if (permissionName == PermissionName.FineLocationAlways) { return(UnityEngine.Android.Permission.FineLocation); } if (permissionName == PermissionName.LocationWhenInUse) { return(UnityEngine.Android.Permission.FineLocation); } throw new NotSupportedException("Permission name: " + permissionName.GetType().Name + " is not supported"); }
public string GetPermissionString(PermissionName permissionName) { return($"<editor-permission-string-{permissionName.GetType().Name}"); }
public void RequestUserPermission(PermissionName permissionName) { if (permissionName == PermissionName.FineLocationAlways) { LocationManagerBridge.requestAuthorizedAlways(); } else if (permissionName == PermissionName.LocationWhenInUse) { LocationManagerBridge.requestAuthorizedWhenInUse(); } else { throw new NotSupportedException("Permissions don't support this permission: " + permissionName.GetType().Name); } }