Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions graphics/quick_settings/ic_quick_settings_tile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion src/keepass2android-app/Manifests/AndroidManifest_debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</queries>


<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="35" />
<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_notify_locked" android:label="KP2A entry search" android:name="keepass2android.keepass2android_debug.permission.KP2aInternalSearch" android:protectionLevel="signature" />
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android_debug.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
<application
Expand Down Expand Up @@ -281,6 +281,16 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="426.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="360.0dip" />
<service
android:name="keepass2android.QuickSettingsTileService"
android:icon="@drawable/ic_quick_settings_tile"
android:label="@string/app_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
android:exported="true">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>
</application>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
12 changes: 11 additions & 1 deletion src/keepass2android-app/Manifests/AndroidManifest_net.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<action android:name="android.intent.action.VIEW" />
</intent>
</queries>
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="35" />

<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_launcher" android:label="KP2A entry search" android:name="keepass2android.keepass2android.permission.KP2aInternalSearch" android:protectionLevel="signature" />
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
Expand Down Expand Up @@ -290,6 +290,16 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="426.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="360.0dip" />
<service
android:name="keepass2android.QuickSettingsTileService"
android:icon="@drawable/ic_quick_settings_tile"
android:label="@string/app_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
android:exported="true">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>
</application>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
12 changes: 11 additions & 1 deletion src/keepass2android-app/Manifests/AndroidManifest_nonet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<action android:name="android.intent.action.VIEW" />
</intent>
</queries>
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="35" />

<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_launcher_offline" android:label="KP2A entry search" android:name="keepass2android.keepass2android_nonet.permission.KP2aInternalSearch" android:protectionLevel="signature" />
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher_offline" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android_nonet.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
Expand Down Expand Up @@ -266,6 +266,16 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="426.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="360.0dip" />
<service
android:name="keepass2android.QuickSettingsTileService"
android:icon="@drawable/ic_quick_settings_tile"
android:label="@string/app_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
android:exported="true">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>
</application>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
69 changes: 69 additions & 0 deletions src/keepass2android-app/QuickSettingsTileService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Keepass2Android - Password Manager for Android
* Copyright (C) 2026 Philipp Crocoll
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ---
* Module: QuickSettingsTileService
* Description: Provides a system-wide Quick Settings Tile to launch the application.
* This service allows users to quickly access their password database from the
* Android notification shade.
*/

using System;
using Android.App;
using Android.Content;
using Android.Service.QuickSettings;

namespace keepass2android
{
/// <summary>
/// Service to provide a Quick Settings Tile for the Android notification shade.
/// </summary>
[Service(Name = "keepass2android.QuickSettingsTileService",
Permission = Android.Manifest.Permission.BindQuickSettingsTile,
Label = "@string/app_name",
Icon = "@drawable/ic_quick_settings_tile",
Exported = true)]
[IntentFilter(new[] { TileService.ActionQsTile })]
public class QuickSettingsTileService : TileService
{
public override void OnClick()
{
base.OnClick();

if (IsLocked)
{
// Ensures the device is unlocked before attempting to show the UI.
UnlockAndRun(new Java.Lang.Runnable(StartKp2a));
}
else
{
StartKp2a();
}
}

private void StartKp2a()
{
// Use the verified entry point: SelectCurrentDbActivity.
Intent intent = new Intent(this, typeof(SelectCurrentDbActivity));

// MANDATORY: Services must launch activities in a New Task to avoid crashes.
intent.AddFlags(ActivityFlags.NewTask);

// Closes the notification shade and executes the intent.
StartActivityAndCollapse(intent);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M18,8H17V6A5,5 0 0,0 12,1A5,5 0 0,0 7,6V8H6A2,2 0 0,0 4,10V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V10A2,2 0 0,0 18,8M9,6A3,3 0 0,1 12,3A3,3 0 0,1 15,6V8H9V6M18,20H6V10H18V20M12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13Z" />
</vector>
Loading