Android 如何实现应用程序与三星Pass配合使用?

Android 如何实现应用程序与三星Pass配合使用?,android,kotlin,samsung-mobile,Android,Kotlin,Samsung Mobile,我正在尝试编写使用三星Pass和/或Google Auth的简单应用程序,但尽管在我的设备上进行了正确的设置,但这两种应用程序都无法工作。保存密码和用户名的弹出窗口不显示。其他应用程序在我的设备上使用三星Pass/Google Auth运行良好 我的布局如下: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/a

我正在尝试编写使用三星Pass和/或Google Auth的简单应用程序,但尽管在我的设备上进行了正确的设置,但这两种应用程序都无法工作。保存密码和用户名的弹出窗口不显示。其他应用程序在我的设备上使用三星Pass/Google Auth运行良好

我的布局如下:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:importantForAutofill="yes"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <EditText
        android:id="@+id/username"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:autofillHints="username"
        android:hint="username"
        android:inputType="text"
        android:importantForAutofill="yes" />

    <EditText
        android:id="@+id/password"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:autofillHints="password"
        android:hint="password"
        android:importantForAutofill="yes"
        android:inputType="textPassword" />

    <Button
        android:id="@+id/loginButton"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:text="Zaloguj"
        app:layout_constraintTop_toBottomOf="@+id/password" />

</LinearLayout>

我做错了什么

好,找到了启动新活动后必须调用-finish()的原因

    override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
    loginButton.setOnClickListener {
        if (checkCredentials(username.text.toString(), password.text.toString())) {
            val intent = Intent(this, LoggedInActivity::class.java)
            startActivity(intent)
            finish()
        }
    }
}

这意味着什么“应用程序在我的设备上不工作”。什么不起作用?什么也不显示-提示保存用户名和密码
    override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
    loginButton.setOnClickListener {
        if (checkCredentials(username.text.toString(), password.text.toString())) {
            val intent = Intent(this, LoggedInActivity::class.java)
            startActivity(intent)
            finish()
        }
    }
}