All Projects → illiashenkoo → startask-permissions

illiashenkoo / startask-permissions

Licence: Apache-2.0 license
Is a library that helps to handle runtime permissions on Android, entirely written using Kotlin language.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to startask-permissions

easypermissions-ktx
🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.
Stars: ✭ 324 (+730.77%)
Mutual labels:  permissions, runtime-permissions
sentry
A lightweight (23KB) wrapper for inline Android permission checks/requests.
Stars: ✭ 22 (-43.59%)
Mutual labels:  permissions, android-permissions
permissionUtil
Simple permission helper
Stars: ✭ 64 (+64.1%)
Mutual labels:  permissions, runtime-permissions
EffortlessPermissions
An Android permission library extending Google's EasyPermissions with convenient additions.
Stars: ✭ 84 (+115.38%)
Mutual labels:  permissions, runtime-permissions
permissions-ui
Background location permissions request helper
Stars: ✭ 53 (+35.9%)
Mutual labels:  permissions
go-acl
Go library for manipulating ACLs on Windows
Stars: ✭ 97 (+148.72%)
Mutual labels:  permissions
permissions-flow
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.
Stars: ✭ 81 (+107.69%)
Mutual labels:  permissions
permission control system
This is an SDK which helps you to specify which user group (role) members have access to which actions in controllers.
Stars: ✭ 34 (-12.82%)
Mutual labels:  permissions
spree admin roles and access
Admin Roles And Access for Spree
Stars: ✭ 45 (+15.38%)
Mutual labels:  permissions
OLA Play Music App
Music Streaming App
Stars: ✭ 27 (-30.77%)
Mutual labels:  runtime-permissions
django-cancan
🔓Authorization library for Django
Stars: ✭ 36 (-7.69%)
Mutual labels:  permissions
django-tabular-permissions
Display Django permissions in a HTML table that is translatable and easily customized.
Stars: ✭ 60 (+53.85%)
Mutual labels:  permissions
iam-policies
Iam policies implementation for create roles and manage permissions
Stars: ✭ 20 (-48.72%)
Mutual labels:  permissions
shyft
⬡ Shyft is a server-side framework for building powerful GraphQL APIs 🚀
Stars: ✭ 56 (+43.59%)
Mutual labels:  permissions
django-hats
Role-based permissions system for Django. Everyone wears a different hat, some people wear multiple.
Stars: ✭ 21 (-46.15%)
Mutual labels:  permissions
lakecli
A CLI to manage and monitor permissions in AWS Lake Formation
Stars: ✭ 22 (-43.59%)
Mutual labels:  permissions
EasyGrant
EasyGrant is yet another Android Library to ease the process of asking Runtime Permissions, written in Kotlin compatible with both Kotlin and Java
Stars: ✭ 16 (-58.97%)
Mutual labels:  runtime-permissions
react-redux-permissions
A permissions library for react and redux applications.
Stars: ✭ 44 (+12.82%)
Mutual labels:  permissions
laminas-permissions-acl
Provides a lightweight and flexible access control list (ACL) implementation for privileges management
Stars: ✭ 29 (-25.64%)
Mutual labels:  permissions
MayI
Android Runtime Permissions made easy
Stars: ✭ 17 (-56.41%)
Mutual labels:  runtime-permissions

StartaskPermissions

JitPack Android Arsenal

StartaskPermissions is a library that helps to handle runtime permissions on Android, entirely written using Kotlin language.

Using in your projects

Gradle Gradle

The library is published to JitPack repository.

  1. Add the JitPack repository to your root build.gradle at the end of repositories.
allprojects {
    repositories {
        //...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add the dependency

${latest.version} is

dependencies {
    implementation "com.github.illiashenkoo:startask-permissions:${latest.version}"
}

Kotlin Usage with Kotlin

  1. Add the following line to AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
  1. Create a Permission object
private val permission: Permission by lazy {
    Permission.Builder(Manifest.permission.CAMERA)
            .setRequestCode(MY_PERMISSIONS_REQUEST_CODE)
            .build()
}
  1. Check and request permission if needed
permission.check(this)
        .onGranted {
            // All requested permissions are granted
        }.onShowRationale {
            // Provide an explanation if the user has already denied that permission request
        }
  1. Delegate the permission handling to library
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults)
    permission.onRequestPermissionsResult(this, requestCode, grantResults)
            .onGranted {
                // All requested permissions are granted
            }.onDenied {
                // Oops, some of the permissions are denied
            }.onNeverAskAgain {
                // Oops, some of the permissions are denied
                // User chose "never ask again" about a permission
            }
}

Look at the examples of using the library

License

Apache License 2.0

Contacts

Oleg Illiashenko

Contributions and releases

All development (both new features and bug fixes) is performed in develop branch. This way master sources always contain sources of the most recently released version. Please send PRs with bug fixes to develop branch. Fixes to documentation in markdown files are an exception to this rule. They are updated directly in master.

The develop branch is pushed to master during release.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].