Android Library that provides passcode lock to your app
Clone or download
mzorz Merge pull request #57 from wordpress-mobile/update/readme-not-mainta…

Add warning about lack of maintenance to README
Latest commit ea91268 Jan 24, 2018

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:
dependencies {
    // use the latest 1.x version
    compile 'org.wordpress:passcodelock:1.+'
  • Edit your AndroidManifest.xml and declare the following activities:
    android:windowSoftInputMode="stateHidden" >
    android:windowSoftInputMode="stateHidden" >
  • Add the following line in onCreate of your App file:


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 to in the library/ directory of the project.

Publish it to bintray:

$ ./gradlew assemble publishToMavenLocal bintrayUpload -PbintrayUser=FIXME -PbintrayKey=FIXME -PdryRun=false

Apps that use this library


Dual licensed under MIT, and GPL.