permission-bitte
sensorberg-dev
73
Visit GitHub Repo
Permissions

Permission Bitte

Download

Easiest way to ask for user permission in Android

  • Absurdly minimal API. There're only 3 static methods and one interface with callbacks.
  • No annotations, no worry about onRequestPermissionsResult, no worry about shouldShowRequestPermissionRationale
  • Plays nice with ArchitectureComponents, lets your ViewModel implement the interface

The API

PermissionBitte.shouldAsk(FragmentActivity, BitteBitte) // let you know if you need permission
PermissionBitte.ask(FragmentActivity, BitteBitte) // ask for permission and handle all callbacks
PermissionBitte.goToSettings(FragmentActivity) // just a helper

The Callback

interface BitteBitte
  void yesYouCan(); // all permissions accepted
  void noYouCant(); // the user marked "Never ask again"
  void askNicer(); // show rationale

Gradle

repositories {
  jcenter()
}

dependencies {
  implementation 'com.sensorberg.libs:permission-bitte:<latest-version>'
}

Become Pro in Android by watching videos

OUR LEARNERS WORK AT