com.samsung.android.sdk.pass.Spass Java Examples

The following examples show how to use com.samsung.android.sdk.pass.Spass. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BiometricLoginUtils.java    From arcusandroid with Apache License 2.0 6 votes vote down vote up
public static Spass initSamsungPass(Context context) {
    Spass sPass = new Spass();
    try {
        sPass.initialize(context);
        /* initialize()
           Initializes the Pass package
           Checks if this is a Samsung device
           Checks if the device supports the Pass package
           Checks if the Pass package libraries are installed
         */
        if(sPass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT)) {
            hasPassFingerprintEnrolled = true;
            return sPass;
        }
    } catch (SsdkUnsupportedException | UnsupportedOperationException e) {
        // This is thrown for non-Samsung devices
        logger.info("This is not a Samsung device and it uses fingerprint: ", e);
    }
    return null;
}
 
Example #2
Source File: SamsungPass.java    From arcusandroid with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isHardwareAvailable() {
    try{
        return mSpass!= null && mSpass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT);
    } catch (Exception e){
        logger.debug("Fingerprint hardware is unavailable: ", e);
        return false;
    }
}
 
Example #3
Source File: SamsungFingerprint.java    From FingerprintIdentify with MIT License 5 votes vote down vote up
public SamsungFingerprint(Context context, ExceptionListener exceptionListener) {
    super(context, exceptionListener);

    try {
        Spass spass = new Spass();
        spass.initialize(mContext);
        mSpassFingerprint = new SpassFingerprint(mContext);
        setHardwareEnable(spass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT));
        setRegisteredFingerprint(mSpassFingerprint.hasRegisteredFinger());
    } catch (Throwable e) {
        onCatchException(e);
    }
}
 
Example #4
Source File: SpassReprintModule.java    From reprint with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isHardwarePresent() {
    try {
        return spass != null && spass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT);
    } catch (Exception ignored) {
        return false;
    }
}