Skip to content
This repository has been archived by the owner. It is now read-only.
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
lov
sample
.gitignore
LICENSE
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

Lov

Lov[loːv] is a library aimed at making permission requests on Android simple.

Usage

Using the object directly:

Lov.requestPermissions(context, permissions)
        .subscribe({ if (it.granted) { /* Permission was granted */ } })

Or use the Context extension method to drop the Lov.

Show rationale when needed:

Lov.addRationale(permission,
                 PermissionRationale(R.string.rationale_title,
                                     R.string.rationale_ok,
                                     R.string.rationale_cancel,
                                     R.string.rationale_message))

Of course you can call Lov from Java, just use Lov.INSTANCE.

Download

Lov is available on jcenter.

Gradle

compile 'net.niiranen:lov:0.1.0'

Maven

<dependency>
    <groupId>net.niiranen</groupId>
    <artifactId>lov</artifactId>
    <version>0.1.0</version>
    <type>pom</type>
</dependency>

License

Copyright 2016 Nina Niiranen

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.
You can’t perform that action at this time.