Omega-R on GitHub

Omega-R Open Source

Our reusable components

android-permissions Download Build Status

An android library that makes it really easy to deal with dynamic permissions. Based on the context, library automatically decides whether to show a dialog (in case app is in foreground) or a notification (in case permission is required by a background service).

How does it work?

Example:

PermissionManager permissionManager = PermissionManager.getInstance(context);
permissionManager.checkPermissions(singleton(Manifest.permission.CAMERA), new PermissionManager.PermissionRequestListener() {
                @Override
                public void onPermissionGranted() {
                    Toast.makeText(context, "Permissions Granted", Toast.LENGTH_SHORT).show();
                }

                @Override
                public void onPermissionDenied() {
                    Toast.makeText(context, "Permissions Denied", Toast.LENGTH_SHORT).show();
                }
            });

Including into project

Gradle: compile 'com.intentfilter:android-permissions:0.1.2'

Add as android-permissions as dependency inside app module level build.gradle under dependencies block. Your app level build.gradle should look like:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.intentfilter:android-permissions:0.1.2'
}