Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ctkqiang/simple_permissions

A Flutter Library For Requesting OS permission for ANdroid and IOS
https://github.com/ctkqiang/simple_permissions

Last synced: 20 days ago
JSON representation

A Flutter Library For Requesting OS permission for ANdroid and IOS

Awesome Lists containing this project

README

        

# Simple Permissions

A new flutter plugin for checking and requesting permissions on iOs and Android.

## Getting Started

Make sure you add the needed permissions to your Android Manifest [Permission](https://developer.android.com/reference/android/Manifest.permission.html)
and Info.plist.

```xml

```

## API
### List of currently available permissions

```dart
enum Permission {
AcceptHandover,
AccessBackgroundLocation,
AccessCheckinProperties,
AccessFineLocation,
AccessCoarseLocation,
AccessLocationExtraCommands,
AlwaysLocation,
AccessMediaLocation,
AccessNetworkState,
AccessNotificationPolicy,
AccessWifiState,
AccountManager,
ActivityRecognition,
AddVoiceMail,
AnswerPhoneCalls,
AccessMotionSensor,
BatteryStats,
BindAccessibilityService,
BindAppWidget,
BindAutoFillService,
BindCallRedirectionService,
BindCarrierMessagingClientService,
BindCarrierMessagingService,
BindCarrierServices,
BindChooserTargetService,
BindConditionProviderService,
BindControls,
BindDeviceAdmin,
BindDreamService,
BindInCallService,
BindInputMethod,
BindNfcService,
BindNotificationListenerService,
BindPrintService,
BindQuickAccessWalletService,
BindQuickSettingsTile,
BindRemoteViews,
BindScreeningService,
BindTelecomConnectionService,
BindTextService,
BindTvInput,
BindVoiceInteraction,
BindVRListenerService,
Bluetooth,
BlutoothAdmin,
BluetoothPrivileged,
BodySensors,
BroadcastSMS,
CallPhone,
CallPrivileged,
Camera,
CaptureAudioOutput,
ChangeComponentEnabledState,
ChangeNetworkState,
ClearAppCache,
ControlLocationUpdates,
ForegroundService,
GetAccountsPrivileged,
GlobalSearch,
Internet,
KillBackgroundProcesses,
ManageDocuments,
MediaContentControl,
ModifyAudioSettings,
NFC,
NFCPreferedPaymentInfo,
NFCTransactionEvent,
PhotoLibrary,
ReadCalendar,
ReadCallLog,
RecordAudio,
ReadExternalStorage,
ReadPhoneState,
ReadPrecisePhoneState,
ReadContacts,
ReadSms,
RequestCompanionRunInBackground,
RequestCompanionUseDataInBackground,
SendSMS,
SetAlarm,
SmsFinancialTransactions,
UseBiomatric,
UseFingeprint,
UseSip,
Vibrate,
WriteContacts,
WhenInUseLocation,
WriteExternalStorage
}
```

```dart
/// Permissions status enum (iOS)
enum PermissionStatus { notDetermined, restricted, denied, authorized }
```

### Methods
```dart
/// Check a [permission] and return a [Future] with the result
static Future checkPermission(Permission permission);

/// Request a [permission] and return a [Future] with the result
static Future requestPermission(Permission permission);

/// Open app settings on Android and iOS
static Future openSettings();

/// Get iOs permission status
static Future getPermissionStatus(Permission permission)
```

$Support

Email: [[email protected]](mailto:[email protected] )

Donate

### Wechat:
![](https://raw.githubusercontent.com/johnmelodyme/ShortestPathAlgorithm/master/assets/wechat.png)


### Bitcoin:
![](https://github.com/johnmelodyme/ShortestPathAlgorithm/raw/master/assets/btc.jpg)