Permission Bitte

Additional

Language
Java
Version
N/A
Created
Nov 30, 2017
Updated
Feb 6, 2018
Owner
Sensorberg GmbH (sensorberg-dev)
Contributor
budius
1
Activity
Badge
Generate
Download
Source code
APK file

Promotion

Permission Bitte

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>'
}