Skip to content
This repository was archived by the owner on Apr 15, 2020. It is now read-only.

Add override callback for checkPasscode & setPasscode#151

Open
bertrandmartel wants to merge 1 commit intoomadahealth:masterfrom
bertrandmartel:lock-callback
Open

Add override callback for checkPasscode & setPasscode#151
bertrandmartel wants to merge 1 commit intoomadahealth:masterfrom
bertrandmartel:lock-callback

Conversation

@bertrandmartel
Copy link

I needed to have a different process to manage checkPasscode & setPasscode so I added callback for each of those 2 methods. A sample usecase of this would be a SIM application that holds the pincode, in that case, the pin code shouldn't be stored in SharedPreferences since the pin code is checked and set on the SIM card.

Exemple in onCreate of CustomPinActivity :

LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
lockManager.getAppLock().setCallback(new ILockCallback() {
    @Override
    public boolean onCheckPasscode(String inputPasscode) {
        //check pin code on SIM card
        return false;
    }

    @Override
    public boolean onSetPasscode(String passcode) {
        //set pin code on SIM card
        return false;
    }
});

@bertrandmartel
Copy link
Author

For reference, the project where I used this : https://github.com/bertrandmartel/sim-password-wallet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant