add a little help page about autofill

This commit is contained in:
Philipp Crocoll
2018-01-08 11:06:30 +01:00
parent 074b63d68d
commit 60bcfa8ab1
6 changed files with 60 additions and 13 deletions

20
docs/OreoAutoFill.md Normal file
View File

@@ -0,0 +1,20 @@
Google has introduced the Android Autofill interface in Android 8. Keepass2Android supports this interface. In most Android apps and all Autofill-enabled browsers, this is the most convenient way of entering passwords. As soon as you focus a field, you will see a popup "Fill with Keepass2Android".
<img src="autofill-facebook.png" />
After clicking this popup, you can unlock your KP2A database. If automatic look up succeeds, KP2A will close automatically, if not you are prompted to select the entry you want to auto-fill. When returning to the target app, the fields should be filled automatically already.
As of January 2018, the following browsers are known to have Android Autofill support:
* Firefox Focus / Firefox Klar
* Opera Mini
These browsers do not (yet) have autofill support:
* Google Chrome
* Firefox for Android
* Brave-Browser
* Opera
Please use the Share-URL-feature and the built-in KP2A keyboard for these browsers.

BIN
docs/autofill-facebook.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -330,12 +330,16 @@ namespace keepass2android
Util.MoveBottomBarButtons(Resource.Id.cancel_insert_element, Resource.Id.insert_element, Resource.Id.bottom_bar, this);
}
if (FindViewById(Resource.Id.show_autofill_info) != null)
{
FindViewById(Resource.Id.show_autofill_info).Click += (sender, args) => Util.GotoUrl(this, "https://philippc.github.io/keepass2android/OreoAutoFill.html");
Util.MoveBottomBarButtons(Resource.Id.show_autofill_info, Resource.Id.enable_autofill, Resource.Id.autofill_buttons, this);
}
SetResult(KeePass.ExitNormal);
SetResult(KeePass.ExitNormal);

View File

@@ -51,14 +51,31 @@
android:layout_margin="6dp"
android:layout_marginBottom="2dp"
/>
<Button
android:id="@+id/enable_autofill"
android:layout_width="wrap_content"
<RelativeLayout
android:id="@+id/autofill_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:paddingTop="4dp"
android:text="@string/autofill_enable"
style="@style/BottomBarButton" />
android:orientation="horizontal"
android:baselineAligned="false">
<Button
android:id="@+id/enable_autofill"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:paddingTop="4dp"
android:text="@string/autofill_enable"
style="@style/BottomBarButton" />
<Button
android:id="@+id/show_autofill_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingTop="4dp"
android:text="@string/show_autofill_help"
style="@style/BottomBarButton" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -1042,6 +1042,7 @@ Initial public release
<string name="autofill_hint">Keepass2Android supports Android\'s Autofill feature but it looks like you haven\'t enabled it yet.</string>
<string name="autofill_enable">Enable Autofill</string>
<string name="show_autofill_help">Show Autofill help</string>
<string name="autofill_sign_in_prompt">Fill with Keepass2Android</string>
<string name="invalid_link_association">Could not associate web domain %1$s with app %2$s</string>

View File

@@ -480,13 +480,18 @@ namespace keepass2android
{
if (((AutofillManager) Activity.GetSystemService(Java.Lang.Class.FromType(typeof(AutofillManager))))
.HasEnabledAutofillServices)
{
autofillPref.Summary = Activity.GetString(Resource.String.plugin_enabled);
autofillPref.Intent = new Intent(Intent.ActionView);
autofillPref.Intent.SetData(Android.Net.Uri.Parse("https://philippc.github.io/keepass2android/OreoAutoFill.html"));
}
else
{
autofillPref.Summary = Activity.GetString(Resource.String.not_enabled);
autofillPref.Intent = new Intent(Settings.ActionRequestSetAutofillService);
autofillPref.Intent.SetData(Android.Net.Uri.Parse("package:" + Activity.PackageName));
}
autofillPref.Intent = new Intent(Settings.ActionRequestSetAutofillService);
autofillPref.Intent.SetData(Android.Net.Uri.Parse("package:" + Activity.PackageName));
}
}