mattsilber / applock Goto Github PK
View Code? Open in Web Editor NEWA simple library for locking and unlocking Activities with a PIN code or Fingerprint (e.g. a child lock).
License: Other
A simple library for locking and unlocking Activities with a PIN code or Fingerprint (e.g. a child lock).
License: Other
Unable to View TextView (PINInputView) where we enter password . when i used this library. Please help
Hello @mattsilber ,
Please find my code below:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (android.os.Build.VERSION.SDK_INT >= 23) {
fingerScannerMain();
} else {
passwordLock();
}
}
public void passwordLock(){
new CreateLockDialogBuilder(this,
new CreateLockDialogBuilder.LockCreationListener(){
public void onLockCanceled(){ } // Dialog was closed without entry
public void onLockSuccessful(){
Intent intent = new Intent(MainActivity.this, WelcomeClass.class);
startActivity(intent);
}
})
.show();
ActionLockingHelper.unlockIfRequired(this, new UnlockDialogBuilder.UnlockEventListener() {
public void onCanceled() {
} // Dialog was closed without entry
public void onUnlockFailed(String reason) {
} // Not called with default Dialog, instead is handled internally
public void onUnlockSuccessful() {
Intent intent = new Intent(MainActivity.this, WelcomeClass.class);
startActivity(intent);
}
});
}
When I am running the code from android studio, it gets installed in my phone and directly opens the WelcomeClass activity rather than asking for "Enter a 4-digit code to lock app". When I press back at that time it is asking me for the lock at that time it works fine but I am not sure why it is going directly to the next activity before lock. Getting exception as well "E/WindowManager: android.view.WindowLeaked:".
Also if I clicked outside the dialog box, it does not exit the program it continues with the next activity, ideally it should not let you proceed if you touched outside the dialog box.
Error messages received in AuthenticationCallback#onAuthenticationError
should propagate back to the UI, instead of masking all errors as R.string.applock__fingerprint_error_unknown
I am trying to change pin in the Settings screen. But I am not able to close the dialogue after changing the pin.
ActionLockingHelper.unlockIfRequired(mContext, new UnlockDialogBuilder.UnlockEventListener(){
public void onCanceled(){ } // Dialog was closed without entry
public void onUnlockFailed(String reason){ } // Not called with default Dialog, instead is handled internally
public void onUnlockSuccessful(){
new CreateLockDialogBuilder(mContext,
new CreateLockDialogBuilder.LockCreationListener(){
public void onLockCanceled(){ } // Dialog was closed without entry
public void onLockSuccessful(){
ActionLockingHelper.unlockIfRequired(mContext, new UnlockDialogBuilder.UnlockEventListener(){
public void onCanceled(){ } // Dialog was closed without entry
public void onUnlockFailed(String reason){ } // Not called with default Dialog, instead is handled internally
public void onUnlockSuccessful(){
// Want to close the dialog here
}
});
}
})
.show();
}
});
Hi , i am using this library for pin lock in my app, but i am getting error , please find the below
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.guardanis.applock.pin.PINItemAnimator.cancel()' on a null object reference
11-10 15:03:46.275 30423-30423/competent.groove.feetport W/System.err: at com.guardanis.applock.pin.PINInputView.cancelPreviousAnimation(PINInputView.java:183)
11-10 15:03:46.275 30423-30423/competent.groove.feetport W/System.err: at com.guardanis.applock.pin.PINInputView.animate(PINInputView.java:173)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at com.guardanis.applock.pin.PINInputView.animateLastIn(PINInputView.java:169)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at com.guardanis.applock.pin.PINInputView.afterTextChanged(PINInputView.java:154)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.widget.TextView.sendAfterTextChanged(TextView.java:7706)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:9494)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:972)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:516)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:454)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:33)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.text.method.NumberKeyListener.onKeyDown(NumberKeyListener.java:121)
11-10 15:03:46.276 30423-30423/competent.groove.feetport W/System.err: at android.widget.TextView.doKeyDown(TextView.java:5812)
11-10 15:03:46.277 30423-30423/competent.groove.feetport W/System.err: at android.widget.TextView.onKeyDown(TextView.java:5625)
11-10 15:03:46.277 30423-30423/competent.groove.feetport W/System.err: at android.view.KeyEvent.dispatch(KeyEvent.java:2632)
11-10 15:03:46.277 30423-30423/competent.groove.feetport W/System.err: at android.view.View.dispatchKeyEvent(View.java:8416)
11-10 15:03:46.278 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.278 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1495)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:2361)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1709)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.app.Activity.dispatchKeyEvent(Activity.java:2712)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:543)
11-10 15:03:46.279 30423-30423/competent.groove.feetport W/System.err: at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:53)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:315)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:53)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2276)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4090)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4052)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3604)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3657)
11-10 15:03:46.280 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3623)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3740)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3631)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3797)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3604)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3657)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3623)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3631)
11-10 15:03:46.283 30423-30423/competent.groove.feetport W/System.err: at
See jcenter's deprecation notice
It would be great if this library would be translated.
I would suggest using Weblate, as it makes it very easy for non-technical translators. They have free hosting for Open Source projects: https://weblate.org/en-gb/hosting/ (scroll down to "Weblate proudly supports libre projects")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.