标签: passcode

如何在React-Native中以编程方式检查对Touch ID,Face ID,密码和模式锁定的支持

我已react-native-fingerprint-scanner在我的应用程序中实现的正常工作Touch Id

现在,我想为两个平台的Touch ID,Face ID和密码进行身份验证

是否可以检查您的设备是否分别要求支持lock pattern

我也尝试过使用react-native-touch-id但它对我不起作用Face Id

有什么方法可以在两个平台(iOS / android)上实现这一目标吗?

参考:链接

在此处输入图片说明

在此处输入图片说明

touch-id react-native passcode face-id android-biometric

6
推荐指数
1
解决办法
506
查看次数

Android:如何仅为我的应用程序设置密码/PIN?

我正在开发一个应用程序,我需要通过为用户设置密码/密码/pin 来设置安全功能,以便每当他们从后台打开应用程序时,应用程序都会要求输入密码/密码/pin。我读了一些这样的文章/解决方案但它们对我没有帮助。我们在普通银行应用程序中发现了相同的功能,每当您打开应用程序时,他们都会要求输入密码/指纹。

我已经设置了将密码/密码保存在共享首选项中的逻辑,但我不确定何时询问。我知道我们不能用密码/pin 活动替换启动屏幕,因为有时从应用程序的 homeScreen/MainActivity 中,用户按下主页按钮,当他们再次从最近的应用程序打开应用程序时,应用程序应该要求密码/pin 来恢复应用程序使用。

任何帮助,将不胜感激。

security android kotlin passcode

5
推荐指数
1
解决办法
3216
查看次数

如何在我的应用中使用密码锁定场景?

实际上,我构建了一个包含本地身份验证的应用程序。

到目前为止我的代码:

func authenticateUser() {
        let authenticationContext = LAContext()
        var error: NSError?
        let reasonString = "Touch the Touch ID sensor to unlock."

        // Check if the device can evaluate the policy.
        if authenticationContext.canEvaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, error: &error) {

            authenticationContext.evaluatePolicy( .deviceOwnerAuthenticationWithBiometrics, localizedReason: reasonString, reply: { (success, evalPolicyError) in

                if success {
                    print("success")
                } else {
                    if let evaluateError = error as NSError? {
                        // enter password using system UI 
                    }

                }
            })

        } else {
            print("toch id not available")
           // enter password using …
Run Code Online (Sandbox Code Playgroud)

authentication xcode ios swift passcode

2
推荐指数
1
解决办法
6639
查看次数

未找到 Passcode View 的类 Androidx.legacy.widget.space

此活动最初可以正常工作,但后来突然停止工作,并向我显示了此错误。我不知道如何修复它,我不记得从我的 app.gradle 文件中删除了任何东西,但有谁知道如何解决它?任何帮助将不胜感激

下面是我的密码视图主要活动(下面显示的 XML 有错误) ''' PasscodeView PasswordView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_password_view);

    PasswordView = findViewById(R.id.PasswordView);
    PasswordView.setPasscodeLength(4)
            .setLocalPasscode("1234")
            .setListener(new PasscodeView.PasscodeViewListener() {
                @Override
                public void onFail() {
                    Toast.makeText(PasswordView.this, "Passcode do not match",Toast.LENGTH_SHORT).show();
                }
                @Override
                public void onSuccess(String number) {
                    Intent intent = new Intent(PasswordView.this,Main2Activity.class);
                    startActivity(intent);
                }
            });

}}
Run Code Online (Sandbox Code Playgroud)

'''

密码视图的错误和 XML 的屏幕截图

App.Gradle 的第一部分

App.Gradle 的第二部分(依赖项)

java android passcode

1
推荐指数
2
解决办法
1935
查看次数