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.
How do I set this PinView before a particular activity if password is set and remove , if password not set ?
Please brief me about this , with respect to an activity
You can check if PIN is setup by using this piece of code. If PIN not set, you can finish the activity.
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.
You can check if PIN is setup by using this piece of code. If PIN not set, you can finish the activity.
Error:(20, 0) Could not find method compile() for arguments [com.kbeanie:pinscreenlibrary:1.0.0@aar] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Open File
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.
How to clear previous pin values??