Merge branch 'master' into nonet

Conflicts:
	docs/README.md
This commit is contained in:
Philipp Crocoll
2017-12-02 14:25:37 +01:00
113 changed files with 4135 additions and 1411 deletions

View File

@@ -0,0 +1,5 @@
As of December 2017, Google does not accept the use of Accessibility services for anything except helping people with disabilities. This means that Keepass2Android can no longer provide the accessibility service based AutoFill feature. Otherwise, Google would remove Keepass2Android from Play Store.
If you want to continue using this feature, please [install the Accessibility service based AutoFill plugin](https://github.com/PhilippC/kp2a_accservice_autofill/releases/).
After installation, please enable the accessibility service "KP2A AutoFillPlugin" in the Android system settings. When trying to use the plugin for the first time, KP2A will ask you if the plugin may access the Keepass database. Please accept this to use the plugin.

View File

@@ -2,10 +2,18 @@
Displays password entries as QR code; can be used to scan QR codes which can then be added to Keepass2Android.
[https://play.google.com/store/apps/details?id=keepass2android.plugin.qr](https://play.google.com/store/apps/details?id=keepass2android.plugin.qr)
# KeyboardSwap Plug-in
Allows to switch input method automatically on non-rooted devices.
[https://play.google.com/store/apps/details?id=keepass2android.plugin.keyboardswap2](https://play.google.com/store/apps/details?id=keepass2android.plugin.keyboardswap2)
# AutoFill Plug-in
Uses Android Accessibility Service to provide an option to AutoFill forms (e.g. on Chrome) or any Android app.
[https://philippc.github.io/keepass2android/AccServiceAutoFill.html](https://philippc.github.io/keepass2android/AccServiceAutoFill.html)
# InputStick Plug-in
Allows to send text from KP2A via InputStick to your PC.
[https://play.google.com/store/apps/details?id=com.inputstick.apps.kp2aplugin](https://play.google.com/store/apps/details?id=com.inputstick.apps.kp2aplugin)
# USB Keyboard Plug-in
Allows to send text from KP2A to your PC. Requires special kernel on the Android device.
[https://play.google.com/store/apps/details?id=th.in.whs.k2ausbkbd](https://play.google.com/store/apps/details?id=th.in.whs.k2ausbkbd)
[https://play.google.com/store/apps/details?id=th.in.whs.k2ausbkbd](https://play.google.com/store/apps/details?id=th.in.whs.k2ausbkbd)

View File

@@ -13,10 +13,9 @@ Keepass2Android stores very sensitive user data and therefore implements a plug-
To tell Kp2a that you're a plug-in, you need to add a simple BroadcastReceiver like this:
{{
```java
public class PluginAAccessReceiver
extends keepass2android.pluginsdk.PluginAccessBroadcastReceiver
public class PluginAAccessReceiver extends keepass2android.pluginsdk.PluginAccessBroadcastReceiver
{
@Override
@@ -29,29 +28,29 @@ public class PluginAAccessReceiver
}
}
}}
```
Here, you define the method getScopes where the list of scopes is created which must be granted by the user. The actual logic of the authorization process is implemented by the base class in the sdk.
In order to make this broadcast receiver visible to KP2A, add the following lines (probably with the name adapted to your class name) in the AndroidManifest.xml:
{{
<receiver android:name="PluginAAccessReceiver" android:exported="true">
<intent-filter>
<action android:name="keepass2android.ACTION_TRIGGER_REQUEST_ACCESS" />
```xml
<receiver android:name="PluginAAccessReceiver" android:exported="true">
<intent-filter>
<action android:name="keepass2android.ACTION_TRIGGER_REQUEST_ACCESS" />
<action android:name="keepass2android.ACTION_RECEIVE_ACCESS" />
<action android:name="keepass2android.ACTION_REVOKE_ACCESS" />
</intent-filter>
</receiver>
}}
</intent-filter>
</receiver>
```
Please also add a few strings in your resource files (e.g. strings.xml) with the following keys:
{{
```xml
<string name="kp2aplugin_title">The Great PluginA</string>
<string name="kp2aplugin_shortdesc">Test plugin to demonstrate how plugins work</string>
<string name="kp2aplugin_author">[your name here](your-name-here)</string>
}}
<string name="kp2aplugin_shortdesc">Test plugin to demonstrate how plugins work</string>
<string name="kp2aplugin_author">[your name here](your-name-here)</string>
```
These strings will be displayed to the user when KP2A asks if access should be granted.
## Modifying the entry view
@@ -64,7 +63,7 @@ KP2A 0.9.4 adds a great opportunity for third party apps: Instead of prompting t
To implement this, simply follow the steps descrIbed above in the sections Preparation and Authorization. Then, wherever appropriate in your app, do something like this:
{{
```java
try
{
PlaceholderFragment.this.startActivityForResult(
@@ -73,40 +72,44 @@ To implement this, simply follow the steps descrIbed above in the sections Prepa
}
catch (ActivityNotFoundException e)
{
Toast.makeText(PlaceholderFragment.this.getActivity(), "no KP2A host app found", Toast.LENGTH_SHORT).show();
Toast.makeText(
PlaceholderFragment.this.getActivity(),
"no KP2A host app found",
Toast.LENGTH_SHORT).show();
}
}}
```
(of course you can use PacketManager to check if the intent can be started instead of catching the Exception).
(of course you can use `PacketManager` to check if the intent can be started instead of catching the `Exception`).
Instead of querying credentials associated with your own app, you might want to query other credentials as well. instead of Kp2aControl.getQueryEntryIntentForOwnPackage() use
{{
Kp2aControl.getQueryEntryIntent("google.com")
}}
This requires {"SCOPE_QUERY_CREDENTIALS (whereas getQueryEntryIntentForOwnPackage() requires SCOPE_QUERY_CREDENTIALS_FOR_OWN_PACKAGE)"}.
Instead of querying credentials associated with your own app, you might want to query other credentials as well. instead of `KpControl.getQueryEntryIntentForOwnPackage()` use
`Kp2aControl.getQueryEntryIntent("google.com")`
This requires \{"SCOPE_QUERY_CREDENTIALS (whereas getQueryEntryIntentForOwnPackage() requires SCOPE_QUERY_CREDENTIALS_FOR_OWN_PACKAGE)"\}.
The credential data can be retrieved in onActivityResult():
{{
```java
if ((requestCode == 1) //queryEntry for own package
&& (resultCode == RESULT_OK)) // ensure user granted access and selected something
&& (resultCode == RESULT_OK)) // ensure user granted access and selected something
{
HashMap<String, String> credentials = Kp2aControl.getEntryFieldsFromIntent(data);
if (!credentials.isEmpty())
{
//here we go!
Toast.makeText(getActivity(), "retrieved credenitals! Username="+credentials.get(KeepassDefs.UserNameField), Toast.LENGTH_LONG).show();
Toast.makeText(
getActivity(),
"retrieved credenitals! Username="+credentials.get(KeepassDefs.UserNameField),
Toast.LENGTH_LONG).show();
}
}
}}
```
Note that you get access to all strings (Title, Username, Password, URL, Notes + any user defined strings) in the entry. This may be in intersting in combination with the following section:
## Storing data in KP2A
If you allow the user to set up an account in your app or create a password, e.g. for encryption, please add an option to store this data in the Keepass2Android database, as this will lead to great workflows for the user. It's as simple as
{{
```java
try {
HashMap<String, String> fields = new HashMap<String, String>();
//standard fields
@@ -124,16 +127,15 @@ try {
//add to KP2A
PlaceholderFragment.this.startActivityForResult(
Kp2aControl
.getAddEntryIntent(fields, protectedFields),
2);
Kp2aControl.getAddEntryIntent(fields, protectedFields),
2);
} catch (ActivityNotFoundException e) {
Toast.makeText(
PlaceholderFragment.this.getActivity(),
"no KP2A host app found",
Toast.LENGTH_SHORT).show();
PlaceholderFragment.this.getActivity(),
"no KP2A host app found",
Toast.LENGTH_SHORT).show();
}
}}
```
Note that this does not even require access authorization because the user will actively save the entry anyways (after selecting the group where to create it.)
@@ -142,13 +144,13 @@ With {"SCOPE_DATABASE_ACTIONS"}, you will be informed when the user opens, close
PluginA uses this to simply display a toast message in its ActionReceiver:
{{
```java
@Override
protected void dbAction(DatabaseAction db) {
Log.d("PluginA", db.getAction() + " in file " + db.getFileDisplayName() + " ("+db.getFilePath()+")");
}
}}
```
## Sample plugin

View File

@@ -11,9 +11,7 @@ is the author of Keepass2Android and Keepass2Android Offline.
The contents of your password database is yours and is never collected by us. Keepass2Android stores this data on a location chosen by the user and encrypted in the Keepass database format. The app author does not have any access, neither to the files nor the contents. Depending on the user's choice of the storage location, the files may be stored on third-party servers like Dropbox or Google Drive.
Keepass2Android does not collect personal identifiable information. After unexpected errors or crashes of the app, the user may be asked if he/she whants to send an error report (Keepass2Android regular only). Error reports do not contain database contents, except (depending on the error message) UUIDs of entries. They may contain file paths if the error was related to a failed file operation. Error reports sent from inside the app are sent using Xamarin Insights.
The app author does not pass any of this data to third parties.
Keepass2Android does not collect personal identifiable information. For debugging purposes, the user may activate creating a debug log. This collects data inside the app and is not accessible to any other app nor the author of the app, unless the user explicitly sends the debug log to the author. Debug logs usually do not contain personal identifiable information, except if such information is part of file or folder names. Debug logs will not be shared with third parties unless explicitly authorized by the sender.
# What Android permissions are required?
@@ -22,5 +20,4 @@ The app author does not pass any of this data to third parties.
* **Storage**: Required to allow the user to read/store password databases or key files on the device locally.
* **Fingerprint**: Required if you want to use fingerprint unlock.
* **Vibrate**: Required by the built-in keyboard (vibrate on key press)
* **Bind Accessibility service**: Required to provide the Auto-Fill accessibility service.

View File

@@ -10,7 +10,7 @@ Beta-releases can be obtained by opting in to the [Beta testing channel](https:/
# How can I contribute?
* Help to translate Keepass2Android into your language or improve translations at [our Crowdin page](http://crowdin.net/project/keepass2android)
* Add features by [creating a plugin](How-to-create-a-plug-in_) or creating a pull request. You might want to contact me before you start working so I can coordinate efforts.
* Add features by [creating a plugin](How-to-create-a-plug-in_.md) or creating a pull request. You might want to contact me before you start working so I can coordinate efforts.
* [Make a donation](http://philipp.crocoll.net/donate.php)
# How do I learn more?

1
docs/_config.yml Normal file
View File

@@ -0,0 +1 @@
theme: jekyll-theme-slate