PIN Screen Library for Android

      7 Comments on PIN Screen Library for Android
Here’s a simple and easy implementation for adding PIN lock support for your Android apps. The library can be themed with your app theme colors. It has smooth animations and vibrate cues when something’s wrong.

 

To use this, you just have to write about 10 lines of code, including layouts and everything. It’s so simple.

Steps to implement

  • Add as dependency

Maven:

<dependency>
<groupId>com.kbeanie</groupId>
<artifactId>pinscreenlibrary</artifactId>
<version>1.0.0</version>
</dependency>

Android Studio:

compile ‘com.kbeanie:pinscreenlibrary:1.0.0@aar’ 

  • Add PinView to your layout file.

<com.kbeanie.pinscreenlibrary.views.PinView
android:id=”@+id/pinView”
android:layout_width=”match_parent”
android:layout_height=”wrap_content” />

  • Initialize PinView in two modes

pinView.setModeSetup(PinEntrySetupListener);
pinView.setModeAuthenticate(PinEntryAuthenticationListener)

And finally, handle the callbacks for all events. The complete source code for this project can be found on Github. Let me know if you have any queries or issues. I would be happy to resolve them.

7 thoughts on “PIN Screen Library for Android

    1. Kumar Bibek Post author
      private boolean isPinSetup() {
              PINPreferences preferences = new PINPreferences(this);
              return preferences.isPinSetup();
          }
      

      You can check if PIN is setup by using this piece of code. If PIN not set, you can finish the activity.

    2. Kumar Bibek Post author

      PINPreferences preferences = new PINPreferences(this);
      boolean isSetup = preferences.isPinSetup();

      You can check if PIN is setup by using this piece of code. If PIN not set, you can finish the activity.

    3. Kumar Bibek Post author
      private boolean isPinSetup() {
              PINPreferences preferences = new PINPreferences(this);
              return preferences.isPinSetup();
          }
      

      You can check if PIN is setup by using this piece of code. If PIN not set, you can finish the activity.

    1. Kumar Bibek Post author

      I haven’t updated the library for some time. Probably these problems are due to different build and gradle tools version. Will try to check it soon.

Leave a Reply