Home - ParadiseHell/PermissionTerminator GitHub Wiki

Basic usage.

Add it in your root build.gradle at the end of repositories :

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency :

dependencies {
	implementation 'com.github.ParadiseHell:PermissionTerminator:0.0.1'
}

Enjoy yourself :

PermissionTerminator
	.with(this /*View, Fragment or Actiivty*/ )
	.permissions(
		Manifest.permission.RECORD_AUDIO
		// add more permissions
	)
	.request(
		onGranted = { grantedPermissionList->
			// called when all permissions are granted
		},
		onDenied = { grantedPermissionList, deniedPermissionList ->
			// called when at least a permission is denied
		},
		onNeverAsked = { grantedPermissionList, deniedPermissionList, neverAskPermissionList ->
			// called when at least a permission is never asked
		}
	)