|
| 1 | +# AndroidAppLockscreen |
| 2 | +An easily implementable, clean, minimal Lockscreen module for Android Apps |
| 3 | + |
| 4 | +## Installation |
| 5 | +Add it in your root build.gradle at the end of repositories: |
| 6 | + |
| 7 | +``` |
| 8 | +allprojects { |
| 9 | + repositories { |
| 10 | + maven { url 'https://jitpack.io' } |
| 11 | + } |
| 12 | +} |
| 13 | +``` |
| 14 | + |
| 15 | +Add the dependency |
| 16 | + |
| 17 | +``` |
| 18 | +dependencies { |
| 19 | + implementation 'com.github.p32929:AndroidAppLockscreen:1.0' |
| 20 | +} |
| 21 | +``` |
| 22 | + |
| 23 | +## Usage |
| 24 | +Steps to follow: |
| 25 | +* Extend all ``Activities`` by ``LockscreenHandler`` |
| 26 | +* Add ```EasyLock.checkPassword(this);``` in your ```MainActivity``` (or whichever activity starts at first) |
| 27 | + |
| 28 | +After that you can: |
| 29 | +* Set password |
| 30 | +* Check password |
| 31 | +* Change password |
| 32 | +* Disable password |
| 33 | + |
| 34 | +## Example: |
| 35 | +Step 1: * Extend all ``Activities`` by ``LockscreenHandler`` like this: |
| 36 | + |
| 37 | +``` |
| 38 | +public class MainActivity extends LockscreenHandler { |
| 39 | + // ............................................ |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +Step 2: Add ```EasyLock.checkPassword(this);``` in your ```MainActivity``` (or whichever activity starts at first) like this: |
| 44 | + |
| 45 | +``` |
| 46 | +@Override |
| 47 | + protected void onCreate(Bundle savedInstanceState) { |
| 48 | + super.onCreate(savedInstanceState); |
| 49 | + setContentView(R.layout.activity_main); |
| 50 | +
|
| 51 | + EasyLock.checkPassword(this); |
| 52 | +} |
| 53 | +``` |
| 54 | + |
| 55 | +## Set, Check, Change, Disable Password: |
| 56 | +* To set a password, call ```EasyLock.setPassword();``` |
| 57 | +* To check password, call ```EasyLock.checkPassword();"``` |
| 58 | +* To change password, call ```EasyLock.changePassword();``` |
| 59 | +* To disable password, call ```EasyLock.disablePassword();``` |
| 60 | + |
| 61 | +```setPassword```, ```changePassword``` & ```disablePassword``` needs two parameters: |
| 62 | +1st parameter is the ```Context``` & the |
| 63 | +2nd parameter is the ```Activity class``` to go after finising setting, changing or disabling password... |
| 64 | + |
| 65 | +Check out the app in the repository for more info :) |
| 66 | +Enjoy... |
| 67 | + |
| 68 | +``` |
| 69 | +MIT License |
| 70 | +
|
| 71 | +Copyright (c) 2018 Fayaz Bin Salam |
| 72 | +
|
| 73 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 74 | +of this software and associated documentation files (the "Software"), to deal |
| 75 | +in the Software without restriction, including without limitation the rights |
| 76 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 77 | +copies of the Software, and to permit persons to whom the Software is |
| 78 | +furnished to do so, subject to the following conditions: |
| 79 | +
|
| 80 | +The above copyright notice and this permission notice shall be included in all |
| 81 | +copies or substantial portions of the Software. |
| 82 | +
|
| 83 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 84 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 85 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 86 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 87 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 88 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 89 | +SOFTWARE. |
| 90 | +``` |
0 commit comments