opermission

Android library for ease in requesting run-time permission(s) for any API > 14

License

License

Categories

Categories

Utility General Purpose Libraries
GroupId

GroupId

co.omkar.utility
ArtifactId

ArtifactId

opermission
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

aar
Description

Description

opermission
Android library for ease in requesting run-time permission(s) for any API > 14
Project URL

Project URL

https://github.com/omtodkar/opermission/wiki
Source Code Management

Source Code Management

https://github.com/omtodkar/opermission/wiki

Download opermission

How to add to project

<!-- https://jarcasting.com/artifacts/co.omkar.utility/opermission/ -->
<dependency>
    <groupId>co.omkar.utility</groupId>
    <artifactId>opermission</artifactId>
    <version>0.0.5</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/co.omkar.utility/opermission/
implementation 'co.omkar.utility:opermission:0.0.5'
// https://jarcasting.com/artifacts/co.omkar.utility/opermission/
implementation ("co.omkar.utility:opermission:0.0.5")
'co.omkar.utility:opermission:aar:0.0.5'
<dependency org="co.omkar.utility" name="opermission" rev="0.0.5">
  <artifact name="opermission" type="aar" />
</dependency>
@Grapes(
@Grab(group='co.omkar.utility', module='opermission', version='0.0.5')
)
libraryDependencies += "co.omkar.utility" % "opermission" % "0.0.5"
[co.omkar.utility/opermission "0.0.5"]

Dependencies

compile (1)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 24.2.0

Project Modules

There are no modules declared in this project.

oPermission

License

oPermission is android library to reduce the developer's efforts implementing android run-time permissions boilerplate. It is very simple to implement. With oPermissions it is not necessary to check for API or Build version requesting permissions. oPermissions have an AutoExecute mode, if application is running on API < 23 oPermission will automatically execute respective @GrantedPermission or OPermission with true annotated method(s). Library also supports MVP, MVVM, MVC, etc. architectural patterns.


Usage

Single line code for request.

RequestPermission.on(this).with(PermBean.create(Permission.READ_PHONE_STATE)).request();

Single method to get results.

@OPermission(value = Permission.READ_PHONE_STATE)
void onReadPhoneStatePermission(@Result boolean isGranted) {
    if (isGranted) {
        textView.setText("Write Storage Granted");
    } else {
        textView.setText("Write Storage Denied");
    }
}

If your application is running on API lower than Marshmallows, result method works as permission is granted and value assigned to isGranted is true.


How to get it?

Download

Just append following code in your app module's gradle file.

dependencies {
    //...
    implementation "co.omkar.utility:opermission:$latest"
}

License

Copyright (C) 2018 Omkar Todkar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1