cordova webview 不在表单提交时保存密码

cordova webview is not saving passwords on form submit

我有一个带有 CordovaActivity 的 android 应用程序,它使用 loadUrl("loginurl") 加载 wordpress 网站的登录页面,当用户第一次输入他的凭据时,提示要求记住密码,但是当用户关闭应用程序并重新打开它时,密码字段被清除并且只记住了用户名。 当对同一站点使用本机 android webview 时,密码已正确保存,但我需要在我的应用程序中使用 cordova,知道如何让 CordovaWebview 记住 wordpress 登录密码吗?

 @Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // enable Cordova apps to be started in the background
    Bundle extras = getIntent().getExtras();
    if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {
        moveTaskToBack(true);
    }
    LOGIN_URL = getString(R.string.site_url) + "/wp-login.php";
    // Set by <content src="index.html" /> in config.xml

    loadUrl(LOGIN_URL);

}

3个月后我找到了解决方案,出于某种原因当你使用webview并加载WP登录页面时,如果你已经登录,wordpress会清除密码归档而不是将你重定向到主页,解决方案是在应用程序启动时不加载登录页面,只加载主页并放置一个登录小部件。