This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#android studio files | |
*.iml | |
.gradle | |
/.idea/workspace.xml | |
/.idea/misc.xml | |
/.idea/dictionaries/ | |
/.idea/libraries | |
/captures | |
# OSX files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Keval on 11-Sep-16. | |
* | |
* @author {@link 'https://github.com/kevalpatel2106'} | |
*/ | |
public interface FingerPrintAuthCallback { | |
void onAuthSuccess(); | |
void onAuthFailed(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This Method is used to generate "Android Package Name" hash key | |
public void generateHashkey(){ | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo( | |
com.android,//TODO: change to your package name. | |
PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
compile 'com.multidots:fingerprint-auth:1.0' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
mFingerPrintAuthHelper = FingerPrintAuthHelper.getHelper(this, this); | |
//.... | |
//.... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onResume() { | |
super.onResume(); | |
//start finger print authentication | |
mFingerPrintAuthHelper.startAuth(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onPause() { | |
super.onPause(); | |
mFingerPrintAuthHelper.stopAuth(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onNoFingerPrintHardwareFound() { | |
//Device does not have finger print scanner. | |
} | |
@Override | |
public void onNoFingerPrintRegistered() { | |
//There are no finger prints registered on this device. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FingerPrintUtils.openSecuritySettings(MainActivity.this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
compile 'com.squareup.picasso:picasso:2.5.1' | |
} |
OlderNewer