Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wordpress-mobile/PasscodeLock-Android
Android Library that provides passcode lock to your app
https://github.com/wordpress-mobile/PasscodeLock-Android
Last synced: about 1 month ago
JSON representation
Android Library that provides passcode lock to your app
- Host: GitHub
- URL: https://github.com/wordpress-mobile/PasscodeLock-Android
- Owner: wordpress-mobile
- License: gpl-2.0
- Created: 2013-09-11T08:27:41.000Z (about 11 years ago)
- Default Branch: trunk
- Last Pushed: 2021-12-03T03:55:18.000Z (almost 3 years ago)
- Last Synced: 2024-07-01T10:56:09.360Z (3 months ago)
- Language: Java
- Homepage:
- Size: 557 KB
- Stars: 352
- Watchers: 49
- Forks: 141
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE-GPL
Awesome Lists containing this project
README
* * *
**Not Maintained!**
*This project is no longer being actively maintained. Use at your own risk!** * *
# App passcode library for Android
An app passcode protection implementation, which allows user to protect the app with a four digit code.
Once enabled a four-digit passcode needs to be entered any time your mobile app is launched. This way your app is safe even if your smartphone or tablet falls into the wrong hands.
**Note: This library doesn't add any extra protection to your data. App data will not be encrypted, the library just adds a pin lock screen that makes the app safe even if your kids put their hands on the device :)**
## Example Usage
Add it as a maven dependency in your build.gradle file. PasscodeLock is hosted on the maven central repository.
* In your build.gradle:
```groovy
dependencies {
// use the latest 1.x version
compile 'org.wordpress:passcodelock:1.+'
}
```
* Edit your `AndroidManifest.xml` and declare the following activities:
```xml```
* Add the following line in `onCreate` of your App file:
```java
AppLockManager.getInstance().enableDefaultAppLockIfAvailable(this);
```* In your project you need to use `PasscodePreferenceFragment` in your Preference Activity. See [SettingsActivity][2] as a usage reference. Optionally, you may pass an argument that tells it whether or not to inflate its own preferences, this is only needed if you plan on [providing the preferences](https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/res/xml/settings.xml#L39) via [PasscodePreferenceFragment#setPreferences](https://github.com/wordpress-mobile/PasscodeLock-Android/blob/develop/library/src/org/wordpress/passcodelock/PasscodePreferenceFragment.java#L50).
## Customization
If you want to customize the pinlock icon, the one available in the unlock screen, override the `passcode_logo.xml` drawable resource.
## Hack the library
* Copy `gradle.properties-example` to `gradle.properties` in the `library/` directory of the project.
Publish it to bintray:
```shell
$ ./gradlew assemble publishToMavenLocal bintrayUpload -PbintrayUser=FIXME -PbintrayKey=FIXME -PdryRun=false
```## Apps that use this library
- [WordPress for Android][1]## License
Dual licensed under MIT, and GPL.[1]: https://github.com/wordpress-mobile/WordPress-Android
[2]: https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/java/org/wordpress/android/ui/prefs/SettingsActivity.java