A Kotlin library which helps to request runtime permissions in Android.
ConcurrentModificationException
when updating the listeners while iterating on them in another thread (#288)RuntimePermissionHandler
and all its deprecated usagesManifest.permission.BLUETOOTH
) (https://github.com/fondesa/kpermissions/issues/200)RuntimePermissionHandlerProvider
using the ActivityResultLauncher
API and deprecated the old one (FragmentRuntimePermissionHandlerProvider
)WRITE_EXTERNAL_STORAGE
and READ_EXTERNAL_STORAGE
in a request (#159)sendSuspend()
API (:kpermissions-coroutines
)IMPORTANT: if you are using :kpermissions-coroutines
, kpermissions-rx2
or kpermissions-rx3
, apply the following fix or upgrade to the version 3.1.2.
implementation("com.github.fondesa:kpermissions:3.1.1")
implementation("com.github.fondesa:kpermissions-coroutines:3.1.1") {
exclude group: "kpermissions"
}
sendSuspend()
API (:kpermissions-coroutines
)On the main artifact:
LiveData
supportsend { }
inline APIAdded the secondary artifacts:
com.github.fondesa:kpermissions-rx2
com.github.fondesa:kpermissions-rx3
com.github.fondesa:kpermissions-coroutines
This is a major release.
It introduces the new callback system using the PermissionStatus
API.
All the previous callbacks introduced before the version 3.0.0 are deprecated and should be replaced with the new API.
The deprecated API will be removed in the version 4.x.
To learn more about the PermissionStatus
API check the docs and the wiki.
The motivation behind these big changes is to provide the most flexible way to handle a permissions request.
Even if the versions 1.x and 2.x could seem simpler to use, they forced the lifecycle of a permissions request I thought it was the standard to most of the users.
The version 3.x. doesn't make such assumptions and lets the users to choose how to handle them providing a callback which follows the Android style of onRequestPermissionsResult()
.