Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Gota Libary

With Android 6.0 Marshmallow, Google introduced a new permission model that allows users to better understand why an application may be requesting specific permissions. Rather than the user blindly accepting all permissions at install time, the user is now prompted to accept permissions as they become necessary during application use. As you probably already know, such a change requires efforts on the part of the application developer, this libary will help you to requset any number of permissions with a simple way.

You can report any issue on issues page. Note: If you speak Arabic, you can submit issues with Arabic language and I will check them. :)





dependencies {
	compile 'net.alhazmy13.Gota:libary:1.4.1'


After adding the library, you just need to create an instance from Gota libary and passing an array of permissions.

new Gota.Builder(this)


In order to receive the response, you will need to implement the OnRequestPermissionsBack interfaces.

    public void onRequestBack(int requestId, @NonNull GotaResponse gotaResponse) {
        if(gotaResponse.isGranted(Manifest.permission.CAMERA)) {
           // Your Code

GotaResponse methods

  • deniedPermissions()
    • Return a list of denied permissions.
  • grantedPermissions()
    • Return a list of grated permissions.
  • isGranted(String)
    • To check if the permission was granted or not.
  • isDenied(String)
    • To check if the permission was denied or not.
  • isAllGranted()
    • return true if the all permission was grated
  • isAllDenied()
    • return true if the all permission was denied
  • hasDeniedPermission()
    • return true if there's any denied permission
  • isOnNeverAskAgain()
    • return true if there's any permission that checked as never ask for permission again.
  • requestId
    • Id or token that was submited with Gota request.


You can’t perform that action at this time.