Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
0cd90413d1 | |||
653ee1ccc1
|
|||
9b6a69e227 | |||
e40305b680
|
|||
668e9d653f
|
@ -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
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ android {
|
|||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
debuggable true
|
debuggable true
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
|
@ -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" />
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
|
@ -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 |
1
metadata/en-US/permission_description.txt
Normal file
1
metadata/en-US/permission_description.txt
Normal 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>
|
Reference in New Issue
Block a user