app/src/main/java/com/sap/cloud/mobile/fiori/demo/onboarding/OnboardingView.java
@Override
    public void startEnableFingerprint() {
        int requestCode = OnboardingActivity.FINGERPRINT_ENABLE;
        Intent i = new Intent();
        i.setComponent(new ComponentName(activity.getPackageName(), "com.sap.cloud.mobile.onboarding.fingerprint.EnableFingerprintActivity"));

        EnableFingerprintSettings enableSettings;

        if (activity.isUITest) {
            enableSettings = new EnableFingerprintSettings(activity.getIntent());
        } else {
            enableSettings = new EnableFingerprintSettings();
            String fingerprintEnableHeadlineLabel = activity.sharedPreferences.getString(
                    KEY_ENABLE_HEADLINE_LABEL, null);
            if (fingerprintEnableHeadlineLabel != null) {
                enableSettings.setEnableHeadlineLabel(fingerprintEnableHeadlineLabel);
            }

            String fingerprintEnableDetailLabel = activity.sharedPreferences.getString(
                    KEY_ENABLE_DETAIL_LABEL, null);
            if (fingerprintEnableDetailLabel != null) {
                enableSettings.setEnableDetailLabel(fingerprintEnableDetailLabel);
            }

            String fingerprintEnableButtonTitle = activity.sharedPreferences.getString(
                    KEY_ENABLE_BUTTON_TITLE, null);
            if (fingerprintEnableButtonTitle != null) {
                enableSettings.setEnableButtonTitle(fingerprintEnableButtonTitle);
            }

            String fingerprintEnableAlertTitle = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_TITLE, null);
            if (fingerprintEnableAlertTitle != null) {
                enableSettings.setAlertTitleText(fingerprintEnableAlertTitle);
            }

            String fingerprintEnableAlertMessage = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_MESSAGE, null);
            if (fingerprintEnableAlertMessage != null) {
                enableSettings.setAlertMessageText(fingerprintEnableAlertMessage);
            }

            String fingerprintEnableAlertCancelText = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_CANCEL_BUTTON_TEXT, null);
            if (fingerprintEnableAlertCancelText != null) {
                enableSettings.setAlertCancelButtonText(fingerprintEnableAlertCancelText);
            }

            String fingerprintEnableAlertSettingsText = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_SETTINGS_BUTTON_TEXT, null);
            if (fingerprintEnableAlertSettingsText != null) {
                enableSettings.setAlertSettingsButtonText(fingerprintEnableAlertSettingsText);
            }

            String fingerprintEnableSkipButtonext = activity.sharedPreferences.getString(
                    KEY_SKIP_FOR_NOW_BUTTON_TITLE, null);
            if (fingerprintEnableSkipButtonext != null) {
                enableSettings.setSkipForNowButtonTitle(fingerprintEnableSkipButtonext);
            }
        }

        enableSettings.saveToIntent(i);

        activity.startActivityForResult(i, requestCode);
    }
/**
     * Starts an enable fingerprint activity with intent configured based on the shared preferences.
     */
Starts an enable fingerprint activity with intent configured based on the shared preferences.
Starts an enable fingerprint activity with intent configured based on the shared preferences .
@Override
    public void startEnableFingerprint() {
        int requestCode = OnboardingActivity.FINGERPRINT_ENABLE;
        Intent i = new Intent();
        i.setComponent(new ComponentName(activity.getPackageName(), "com.sap.cloud.mobile.onboarding.fingerprint.EnableFingerprintActivity"));
        EnableFingerprintSettings enableSettings;
        if (activity.isUITest) {
            enableSettings = new EnableFingerprintSettings(activity.getIntent());
        } else {
            enableSettings = new EnableFingerprintSettings();
            String fingerprintEnableHeadlineLabel = activity.sharedPreferences.getString(
                    KEY_ENABLE_HEADLINE_LABEL, null);
            if (fingerprintEnableHeadlineLabel != null) {
                enableSettings.setEnableHeadlineLabel(fingerprintEnableHeadlineLabel);
            }
            String fingerprintEnableDetailLabel = activity.sharedPreferences.getString(
                    KEY_ENABLE_DETAIL_LABEL, null);
            if (fingerprintEnableDetailLabel != null) {
                enableSettings.setEnableDetailLabel(fingerprintEnableDetailLabel);
            }
            String fingerprintEnableButtonTitle = activity.sharedPreferences.getString(
                    KEY_ENABLE_BUTTON_TITLE, null);
            if (fingerprintEnableButtonTitle != null) {
                enableSettings.setEnableButtonTitle(fingerprintEnableButtonTitle);
            }
            String fingerprintEnableAlertTitle = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_TITLE, null);
            if (fingerprintEnableAlertTitle != null) {
                enableSettings.setAlertTitleText(fingerprintEnableAlertTitle);
            }
            String fingerprintEnableAlertMessage = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_MESSAGE, null);
            if (fingerprintEnableAlertMessage != null) {
                enableSettings.setAlertMessageText(fingerprintEnableAlertMessage);
            }
            String fingerprintEnableAlertCancelText = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_CANCEL_BUTTON_TEXT, null);
            if (fingerprintEnableAlertCancelText != null) {
                enableSettings.setAlertCancelButtonText(fingerprintEnableAlertCancelText);
            }
            String fingerprintEnableAlertSettingsText = activity.sharedPreferences.getString(
                    KEY_ENABLE_ALERT_SETTINGS_BUTTON_TEXT, null);
            if (fingerprintEnableAlertSettingsText != null) {
                enableSettings.setAlertSettingsButtonText(fingerprintEnableAlertSettingsText);
            }
            String fingerprintEnableSkipButtonext = activity.sharedPreferences.getString(
                    KEY_SKIP_FOR_NOW_BUTTON_TITLE, null);
            if (fingerprintEnableSkipButtonext != null) {
                enableSettings.setSkipForNowButtonTitle(fingerprintEnableSkipButtonext);
            }
        }
        enableSettings.saveToIntent(i);
        activity.startActivityForResult(i, requestCode);
    }
@ Override public void startEnableFingerprint ( ) { int requestCode = OnboardingActivity . FINGERPRINT_ENABLE ; Intent i = new Intent ( ) ; i . setComponent ( new ComponentName ( activity . getPackageName ( ) , "com.sap.cloud.mobile.onboarding.fingerprint.EnableFingerprintActivity" ) ) ; EnableFingerprintSettings enableSettings ; if ( activity . isUITest ) { enableSettings = new EnableFingerprintSettings ( activity . getIntent ( ) ) ; } else { enableSettings = new EnableFingerprintSettings ( ) ; String fingerprintEnableHeadlineLabel = activity . sharedPreferences . getString ( KEY_ENABLE_HEADLINE_LABEL , null ) ; if ( fingerprintEnableHeadlineLabel != null ) { enableSettings . setEnableHeadlineLabel ( fingerprintEnableHeadlineLabel ) ; } String fingerprintEnableDetailLabel = activity . sharedPreferences . getString ( KEY_ENABLE_DETAIL_LABEL , null ) ; if ( fingerprintEnableDetailLabel != null ) { enableSettings . setEnableDetailLabel ( fingerprintEnableDetailLabel ) ; } String fingerprintEnableButtonTitle = activity . sharedPreferences . getString ( KEY_ENABLE_BUTTON_TITLE , null ) ; if ( fingerprintEnableButtonTitle != null ) { enableSettings . setEnableButtonTitle ( fingerprintEnableButtonTitle ) ; } String fingerprintEnableAlertTitle = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_TITLE , null ) ; if ( fingerprintEnableAlertTitle != null ) { enableSettings . setAlertTitleText ( fingerprintEnableAlertTitle ) ; } String fingerprintEnableAlertMessage = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_MESSAGE , null ) ; if ( fingerprintEnableAlertMessage != null ) { enableSettings . setAlertMessageText ( fingerprintEnableAlertMessage ) ; } String fingerprintEnableAlertCancelText = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_CANCEL_BUTTON_TEXT , null ) ; if ( fingerprintEnableAlertCancelText != null ) { enableSettings . setAlertCancelButtonText ( fingerprintEnableAlertCancelText ) ; } String fingerprintEnableAlertSettingsText = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_SETTINGS_BUTTON_TEXT , null ) ; if ( fingerprintEnableAlertSettingsText != null ) { enableSettings . setAlertSettingsButtonText ( fingerprintEnableAlertSettingsText ) ; } String fingerprintEnableSkipButtonext = activity . sharedPreferences . getString ( KEY_SKIP_FOR_NOW_BUTTON_TITLE , null ) ; if ( fingerprintEnableSkipButtonext != null ) { enableSettings . setSkipForNowButtonTitle ( fingerprintEnableSkipButtonext ) ; } } enableSettings . saveToIntent ( i ) ; activity . startActivityForResult ( i , requestCode ) ; }
Starts an enable fingerprint activity with intent configured based on the shared preferences.
Starts an enable fingerprint activity with intent configured based on the shared preferences .