7 Commits

Author SHA1 Message Date
0cd90413d1 Update app/src/main/AndroidManifest.xml 2024-04-06 19:26:33 +02:00
653ee1ccc1 Fix camera crash & autosave 2024-04-06 19:24:59 +02:00
9b6a69e227 Update plugin com.autonomousapps.dependency-analysis to v1.31.0 2024-04-05 00:02:16 +00:00
e40305b680 Updated icon and permissions 2024-03-29 15:49:10 +01:00
668e9d653f Scaled icon down 2024-03-29 13:47:22 +01:00
bcfcb85121 Update README.md 2024-03-29 13:29:40 +01:00
49c650c8a9 Update README.md 2024-03-29 13:29:19 +01:00
10 changed files with 19 additions and 11 deletions

View File

@ -1,7 +1,7 @@
<!--suppress ALL --> <!--suppress ALL -->
<div align="center"> <div align="center">
<h1>Keepass Fidelity</h1> <h1>Keepass Fidelity</h1>
<img style="width: 120px;" src="./metadata/en-US/images/icon.png" alt="Logo"> <img width="100px" src="./metadata/en-US/images/icon.png" alt="Logo">
<p>A minimalist fidelity/loyalty card plugin</p> <p>A minimalist fidelity/loyalty card plugin</p>
@ -47,7 +47,8 @@
## ⚙️ Permissions ## ⚙️ Permissions
- `CAMERA`: necessary for the scanning of barcodes - `CAMERA`: necessary for importing barcodes from camera
- `READ_MEDIA_VISUAL_USER_SELECTED`: necessary for the importing barcode from images
## 📝 Contribute ## 📝 Contribute

View File

@ -34,6 +34,7 @@ android {
buildTypes { buildTypes {
debug { debug {
debuggable true debuggable true
signingConfig = signingConfigs.getByName("release")
} }
release { release {
minifyEnabled true minifyEnabled true

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:versionCode="6" android:versionCode="7"
android:versionName="1.2a"> android:versionName="1.2b">
<uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera" />

View File

@ -151,6 +151,11 @@ class CreateEntry : Fragment() {
kpEntry.second kpEntry.second
) )
) )
if (!binding.checkboxProtected.isChecked) {
val r = KeepassWrapper.entryExtract(kpEntry.first)
CacheManager.addFidelity(r)
}
activity?.supportFragmentManager?.popBackStack()
} catch (e: ActivityNotFoundException) { } catch (e: ActivityNotFoundException) {
ErrorToaster.noKP2AFound(context) ErrorToaster.noKP2AFound(context)
} catch (e: Exception) { } catch (e: Exception) {

View File

@ -68,7 +68,7 @@ class Scanner : Fragment() {
this.fmt = format this.fmt = format
} }
val isDone = this.code.isNotEmpty() && this.fmt.isNotEmpty() val isDone = this.code.isNotEmpty() && this.fmt.isNotEmpty()
requireActivity().runOnUiThread { activity?.runOnUiThread {
binding.btnScanDone.isEnabled = isDone binding.btnScanDone.isEnabled = isDone
binding.ScanActive.isEnabled = !isDone binding.ScanActive.isEnabled = !isDone
} }

View File

@ -7,8 +7,8 @@ import org.json.JSONObject
object Kp2aControl { object Kp2aControl {
fun getAddEntryIntent( fun getAddEntryIntent(
fields: HashMap<String?, String?>, fields: HashMap<String, String>,
protectedFields: ArrayList<String?>? protectedFields: ArrayList<String>?
): Intent { ): Intent {
val outputData = JSONObject((fields as Map<*, *>)).toString() val outputData = JSONObject((fields as Map<*, *>)).toString()
val startKp2aIntent = Intent(Strings.ACTION_START_WITH_TASK) val startKp2aIntent = Intent(Strings.ACTION_START_WITH_TASK)

View File

@ -21,10 +21,10 @@ object KeepassWrapper {
code: String, code: String,
format: String, format: String,
protectCode: Boolean, protectCode: Boolean,
): Pair<HashMap<String?, String?>, ArrayList<String?>> { ): Pair<HashMap<String, String>, ArrayList<String>> {
val fields = HashMap<String?, String?>() val fields = HashMap<String, String>()
val protected = ArrayList<String?>() val protected = ArrayList<String>()
fields[KeepassDef.TitleField] = title fields[KeepassDef.TitleField] = title
fields[KeepassDef.UrlField] = fields[KeepassDef.UrlField] =
"androidapp://" + fragment.requireActivity().packageName "androidapp://" + fragment.requireActivity().packageName

View File

@ -4,5 +4,5 @@ plugins {
id 'com.android.application' version '8.3.1' apply false id 'com.android.application' version '8.3.1' apply false
id 'com.android.library' version '8.3.1' apply false id 'com.android.library' version '8.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
id 'com.autonomousapps.dependency-analysis' version '1.30.0' apply true id 'com.autonomousapps.dependency-analysis' version '1.31.0' apply true
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1 @@
<ul><li><b>CAMERA:</b> necessary for importing barcodes from camera</li><li><b>READ_MEDIA_VISUAL_USER_SELECTED:</b> necessary for the importing barcode from images</li></ul>