danieldisu / RxSmartLock

Reactive implementation of the Google Smart Lock for passwords

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI

Download

RxSmartLock

This library is a wrapper for the SmartLock for passwords. It makes all interactions with SmartLock API through the reactive streams.

How to use

To save credentials use the function storeCredentials():

RxGoogleSmartLockManager.storeCredentials(context, credentials).subscribe()

To retrieve stored credentials use the function retrieveCredentials():

RxGoogleSmartLockManager.retrieveCredentials(context).subscribe()

There are a few other methods to interract with SmartLock defined in the interface.

Testing

For testing purposes there is EmptySmartLockManager. The methods of that class are empty. Inject EmptySmartLockManager for testing purposes to the classes you are testing.

Dependency

Dependencies are hosted on Maven Central:

implementation 'com.freeletics.rxsmartlock:rxsmartlock:1.0.7'

Keep in mind that this library is written in kotlin which means you also need to add kotlin-stdlib to a project using RxSmartLock.

Snapshot

Latest snapshot (directly published from master branch):

allprojects {
    repositories {
        // Your repositories.
        // ...
        // Add url to snapshot repository
        maven {
            url "https://oss.sonatype.org/content/repositories/snapshots/"
        }
    }
}
implementation 'com.freeletics.rxsmartlock:rxsmartlock:1.0.8-SNAPSHOT'

License

Copyright 2019 Freeletics

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.

About

Reactive implementation of the Google Smart Lock for passwords

License:Apache License 2.0


Languages

Language:Kotlin 100.0%