From 6474ef7488231b4df6935836c441f9bdc3ade313 Mon Sep 17 00:00:00 2001 From: Thomas Wirth Date: Fri, 18 Jun 2021 17:40:16 +0200 Subject: [PATCH 1/7] Reformat code --- buildSrc/src/main/kotlin/Deps.kt | 8 ++++---- buildSrc/src/main/kotlin/Versions.kt | 4 ++-- .../io/github/g00fy2/quickie/QROverlayView.kt | 3 +-- .../g00fy2/quickiesample/MainActivity.kt | 20 +++++++++---------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index ee516349..5253cd51 100644 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -8,16 +8,16 @@ object Deps { const val cameraPreview = "androidx.camera:camera-view:${Versions.cameraView}" } - object UI { - const val materialDesign = "com.google.android.material:material:${Versions.materialDesign}" - } - object MLKit { const val barcodeScanning = "com.google.mlkit:barcode-scanning:${Versions.barcodeScanning}" const val barcodeScanningGms = "com.google.android.gms:play-services-mlkit-barcode-scanning:${Versions.barcodeScanningGms}" } + object UI { + const val materialDesign = "com.google.android.material:material:${Versions.materialDesign}" + } + object Test { const val junitApi = "org.junit.jupiter:junit-jupiter-api:${Versions.junit}" const val junitEngine = "org.junit.jupiter:junit-jupiter-engine:${Versions.junit}" diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 5988d91e..15100933 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -13,11 +13,11 @@ object Versions { const val cameraX = "1.0.0" const val cameraView = "1.0.0-alpha25" - const val materialDesign = "1.3.0" - const val barcodeScanning = "16.1.2" const val barcodeScanningGms = "16.1.5" + const val materialDesign = "1.3.0" + const val detekt = "1.17.1" const val gradleVersions = "0.39.0" const val dokka = "1.4.32" diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt index 361a51d8..15fc45dd 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt @@ -39,12 +39,11 @@ internal class QROverlayView @JvmOverloads constructor( } private val outerRadius = OUT_RADIUS.toPx() private val innerRadius = (OUT_RADIUS - STROKE_WIDTH).toPx() - private val titleTextView = QuickieTextviewBinding.inflate(LayoutInflater.from(context), this, true).root private val outerFrame = RectF() private val innerFrame = RectF() + private val titleTextView = QuickieTextviewBinding.inflate(LayoutInflater.from(context), this, true).root private var maskBitmap: Bitmap? = null private var maskCanvas: Canvas? = null - var isHighlighted = false set(value) { field = value diff --git a/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt b/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt index d9e25bae..e3b85ff1 100644 --- a/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt +++ b/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt @@ -50,16 +50,6 @@ class MainActivity : AppCompatActivity() { } } - private fun setBarcodeFormatDropdown() { - ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item, BarcodeFormat.values().map { it.name }).let { - binding.barcodeFormatsAutoCompleteTextView.setAdapter(it) - binding.barcodeFormatsAutoCompleteTextView.setText(it.getItem(it.getPosition(selectedBarcodeFormat.name)), false) - } - binding.barcodeFormatsAutoCompleteTextView.setOnItemClickListener { _, _, position, _ -> - selectedBarcodeFormat = BarcodeFormat.values()[position] - } - } - private fun showSnackbar(result: QRResult) { val text = when (result) { is QRSuccess -> result.content.rawValue @@ -85,4 +75,14 @@ class MainActivity : AppCompatActivity() { // no Activity found to run the given Intent } } + + private fun setBarcodeFormatDropdown() { + ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item, BarcodeFormat.values().map { it.name }).let { + binding.barcodeFormatsAutoCompleteTextView.setAdapter(it) + binding.barcodeFormatsAutoCompleteTextView.setText(it.getItem(it.getPosition(selectedBarcodeFormat.name)), false) + } + binding.barcodeFormatsAutoCompleteTextView.setOnItemClickListener { _, _, position, _ -> + selectedBarcodeFormat = BarcodeFormat.values()[position] + } + } } \ No newline at end of file From ef3078d576f83ac751b6b125790576bbce758661 Mon Sep 17 00:00:00 2001 From: Thomas Wirth Date: Tue, 22 Jun 2021 14:45:23 +0200 Subject: [PATCH 2/7] =?UTF-8?q?Improve=20error=20handling=20by=20keeping?= =?UTF-8?q?=20analyzer=20in=20throttling=20state=20and=20wait=20=E2=80=A6?= =?UTF-8?q?=20(#9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Improve error handling by keep analyzer in throttling state and wait for ml kit instead closing the activity * Optimize analyzer throttling * Remove whitespaces in strings * Optimize error dialog handling * Remove setResult in oncomplete to prevent overwriting successful results * Reformat code --- .../config/detekt/baseline-bundledDebug.xml | 2 +- .../g00fy2/quickie/utils/MlKitErrorHandler.kt | 9 +++++ .../quickie/utils/PlayServicesValidator.kt | 9 ----- .../github/g00fy2/quickie/QRCodeAnalyzer.kt | 24 +++++++++++-- .../io/github/g00fy2/quickie/QROverlayView.kt | 17 ++++++++-- .../g00fy2/quickie/QRScannerActivity.kt | 34 ++++++++++++++----- .../main/res/layout/quickie_progress_view.xml | 33 ++++++++++++++++++ quickie/src/main/res/values-af/strings.xml | 6 ++-- quickie/src/main/res/values-am/strings.xml | 6 ++-- quickie/src/main/res/values-ar/strings.xml | 6 ++-- quickie/src/main/res/values-as/strings.xml | 6 ++-- quickie/src/main/res/values-az/strings.xml | 6 ++-- quickie/src/main/res/values-be/strings.xml | 6 ++-- quickie/src/main/res/values-bg/strings.xml | 6 ++-- quickie/src/main/res/values-bn/strings.xml | 6 ++-- quickie/src/main/res/values-bs/strings.xml | 6 ++-- quickie/src/main/res/values-ca/strings.xml | 6 ++-- quickie/src/main/res/values-cs/strings.xml | 6 ++-- quickie/src/main/res/values-da/strings.xml | 6 ++-- quickie/src/main/res/values-de/strings.xml | 6 ++-- quickie/src/main/res/values-el/strings.xml | 6 ++-- quickie/src/main/res/values-en/strings.xml | 6 ++-- .../src/main/res/values-es-rUS/strings.xml | 6 ++-- quickie/src/main/res/values-es/strings.xml | 6 ++-- quickie/src/main/res/values-et/strings.xml | 6 ++-- quickie/src/main/res/values-eu/strings.xml | 6 ++-- quickie/src/main/res/values-fa/strings.xml | 6 ++-- quickie/src/main/res/values-fi/strings.xml | 6 ++-- .../src/main/res/values-fr-rCA/strings.xml | 6 ++-- quickie/src/main/res/values-fr/strings.xml | 6 ++-- quickie/src/main/res/values-gl/strings.xml | 6 ++-- quickie/src/main/res/values-gu/strings.xml | 6 ++-- quickie/src/main/res/values-hi/strings.xml | 6 ++-- quickie/src/main/res/values-hr/strings.xml | 6 ++-- quickie/src/main/res/values-hu/strings.xml | 6 ++-- quickie/src/main/res/values-hy/strings.xml | 6 ++-- quickie/src/main/res/values-in/strings.xml | 6 ++-- quickie/src/main/res/values-is/strings.xml | 6 ++-- quickie/src/main/res/values-it/strings.xml | 6 ++-- quickie/src/main/res/values-iw/strings.xml | 6 ++-- quickie/src/main/res/values-ja/strings.xml | 6 ++-- quickie/src/main/res/values-ka/strings.xml | 6 ++-- quickie/src/main/res/values-kk/strings.xml | 6 ++-- quickie/src/main/res/values-km/strings.xml | 6 ++-- quickie/src/main/res/values-kn/strings.xml | 6 ++-- quickie/src/main/res/values-ko/strings.xml | 6 ++-- quickie/src/main/res/values-ky/strings.xml | 6 ++-- quickie/src/main/res/values-lo/strings.xml | 6 ++-- quickie/src/main/res/values-lt/strings.xml | 6 ++-- quickie/src/main/res/values-lv/strings.xml | 6 ++-- quickie/src/main/res/values-mk/strings.xml | 6 ++-- quickie/src/main/res/values-ml/strings.xml | 6 ++-- quickie/src/main/res/values-mn/strings.xml | 6 ++-- quickie/src/main/res/values-mr/strings.xml | 6 ++-- quickie/src/main/res/values-ms/strings.xml | 6 ++-- quickie/src/main/res/values-my/strings.xml | 6 ++-- quickie/src/main/res/values-nb/strings.xml | 6 ++-- quickie/src/main/res/values-ne/strings.xml | 6 ++-- quickie/src/main/res/values-nl/strings.xml | 6 ++-- quickie/src/main/res/values-or/strings.xml | 6 ++-- quickie/src/main/res/values-pa/strings.xml | 6 ++-- quickie/src/main/res/values-pl/strings.xml | 6 ++-- quickie/src/main/res/values-pt/strings.xml | 6 ++-- quickie/src/main/res/values-ro/strings.xml | 6 ++-- quickie/src/main/res/values-ru/strings.xml | 6 ++-- quickie/src/main/res/values-si/strings.xml | 6 ++-- quickie/src/main/res/values-sk/strings.xml | 6 ++-- quickie/src/main/res/values-sl/strings.xml | 6 ++-- quickie/src/main/res/values-sq/strings.xml | 6 ++-- quickie/src/main/res/values-sr/strings.xml | 6 ++-- quickie/src/main/res/values-sv/strings.xml | 6 ++-- quickie/src/main/res/values-sw/strings.xml | 6 ++-- quickie/src/main/res/values-ta/strings.xml | 6 ++-- quickie/src/main/res/values-te/strings.xml | 6 ++-- quickie/src/main/res/values-th/strings.xml | 6 ++-- quickie/src/main/res/values-tl/strings.xml | 6 ++-- quickie/src/main/res/values-tr/strings.xml | 6 ++-- quickie/src/main/res/values-uk/strings.xml | 6 ++-- quickie/src/main/res/values-ur/strings.xml | 6 ++-- quickie/src/main/res/values-uz/strings.xml | 6 ++-- quickie/src/main/res/values-vi/strings.xml | 6 ++-- .../src/main/res/values-zh-rCN/strings.xml | 6 ++-- .../src/main/res/values-zh-rHK/strings.xml | 6 ++-- .../src/main/res/values-zh-rTW/strings.xml | 6 ++-- quickie/src/main/res/values-zu/strings.xml | 6 ++-- quickie/src/main/res/values/strings.xml | 6 ++-- ...vicesValidator.kt => MlKitErrorHandler.kt} | 19 +++++------ 87 files changed, 429 insertions(+), 192 deletions(-) create mode 100644 quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/MlKitErrorHandler.kt delete mode 100644 quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/PlayServicesValidator.kt create mode 100644 quickie/src/main/res/layout/quickie_progress_view.xml rename quickie/src/unbundled/kotlin/io/github/g00fy2/quickie/utils/{PlayServicesValidator.kt => MlKitErrorHandler.kt} (56%) diff --git a/quickie/config/detekt/baseline-bundledDebug.xml b/quickie/config/detekt/baseline-bundledDebug.xml index 901bbf3e..d098e021 100644 --- a/quickie/config/detekt/baseline-bundledDebug.xml +++ b/quickie/config/detekt/baseline-bundledDebug.xml @@ -2,7 +2,7 @@ - FunctionOnlyReturningConstant:PlayServicesValidator.kt$PlayServicesValidator$@Suppress("UNUSED_PARAMETER") fun handleGooglePlayServicesError(activity: Activity, exception: Exception) + FunctionOnlyReturningConstant:MlKitErrorHandler.kt$MlKitErrorHandler$@Suppress("UNUSED_PARAMETER") fun isResolvableError(activity: QRScannerActivity, exception: Exception) LongMethod:IntentExtensions.kt$private fun Intent.toQuickieContentType(rawValue: String): QRContent? UnsafeCallOnNullableType:QRCodeAnalyzer.kt$QRCodeAnalyzer$image!! UnsafeCallOnNullableType:QROverlayView.kt$QROverlayView$maskBitmap!! diff --git a/quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/MlKitErrorHandler.kt b/quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/MlKitErrorHandler.kt new file mode 100644 index 00000000..6c08aa9c --- /dev/null +++ b/quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/MlKitErrorHandler.kt @@ -0,0 +1,9 @@ +package io.github.g00fy2.quickie.utils + +import io.github.g00fy2.quickie.QRScannerActivity + +internal object MlKitErrorHandler { + + @Suppress("UNUSED_PARAMETER") + fun isResolvableError(activity: QRScannerActivity, exception: Exception) = false // always false when bundled +} \ No newline at end of file diff --git a/quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/PlayServicesValidator.kt b/quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/PlayServicesValidator.kt deleted file mode 100644 index da45bab2..00000000 --- a/quickie/src/bundled/kotlin/io/github/g00fy2/quickie/utils/PlayServicesValidator.kt +++ /dev/null @@ -1,9 +0,0 @@ -package io.github.g00fy2.quickie.utils - -import android.app.Activity - -internal object PlayServicesValidator { - - @Suppress("UNUSED_PARAMETER") - fun handleGooglePlayServicesError(activity: Activity, exception: Exception) = false // always false when bundled -} \ No newline at end of file diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt index 1b192531..b65a6d4f 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt @@ -11,7 +11,8 @@ import com.google.mlkit.vision.common.InputImage internal class QRCodeAnalyzer( private val barcodeFormats: IntArray, private val onSuccess: ((Barcode) -> Unit), - private val onFailure: ((Exception) -> Unit) + private val onFailure: ((Exception) -> Unit), + private val onPassCompleted: ((Boolean) -> Unit) ) : ImageAnalysis.Analyzer { private val barcodeScanner by lazy { @@ -22,15 +23,32 @@ internal class QRCodeAnalyzer( } BarcodeScanning.getClient(optionsBuilder.build()) } + @Volatile + private var failureOccurred = false + private var lastCompletedTime = 0L @ExperimentalGetImage override fun analyze(imageProxy: ImageProxy) { if (imageProxy.image == null) return + // throttle analysis if error occurred in previous pass + if (failureOccurred && System.currentTimeMillis() - lastCompletedTime < 1000L) { + imageProxy.close() + return + } + + failureOccurred = false barcodeScanner.process(imageProxy.toInputImage()) .addOnSuccessListener { codes -> codes.mapNotNull { it }.firstOrNull()?.let { onSuccess(it) } } - .addOnFailureListener { onFailure(it) } - .addOnCompleteListener { imageProxy.close() } + .addOnFailureListener { + failureOccurred = true + onFailure(it) + } + .addOnCompleteListener { + lastCompletedTime = System.currentTimeMillis() + onPassCompleted(failureOccurred) + imageProxy.close() + } } @ExperimentalGetImage diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt index 15fc45dd..5e3d05e4 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt @@ -18,6 +18,7 @@ import android.widget.FrameLayout import androidx.core.content.ContextCompat import androidx.core.content.res.ResourcesCompat import androidx.core.graphics.ColorUtils +import io.github.g00fy2.quickie.databinding.QuickieProgressViewBinding import io.github.g00fy2.quickie.databinding.QuickieTextviewBinding import kotlin.math.min import kotlin.math.roundToInt @@ -33,6 +34,7 @@ internal class QROverlayView @JvmOverloads constructor( private val backgroundColor = ColorUtils.setAlphaComponent(Color.BLACK, BACKGROUND_ALPHA.roundToInt()) private val alphaPaint = Paint().apply { alpha = BACKGROUND_ALPHA.roundToInt() } private val strokePaint = Paint(Paint.ANTI_ALIAS_FLAG) + private val loadingBackgroundPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply { color = backgroundColor } private val transparentPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply { color = Color.TRANSPARENT xfermode = PorterDuffXfermode(CLEAR) @@ -42,12 +44,22 @@ internal class QROverlayView @JvmOverloads constructor( private val outerFrame = RectF() private val innerFrame = RectF() private val titleTextView = QuickieTextviewBinding.inflate(LayoutInflater.from(context), this, true).root + private val progressLinearLayout = QuickieProgressViewBinding.inflate(LayoutInflater.from(context), this, true).root private var maskBitmap: Bitmap? = null private var maskCanvas: Canvas? = null var isHighlighted = false set(value) { - field = value - invalidate() + if (field != value) { + field = value + invalidate() + } + } + var isLoading = false + set(value) { + if (field != value) { + field = value + progressLinearLayout.visibility = if (value) View.VISIBLE else View.GONE + } } init { @@ -68,6 +80,7 @@ internal class QROverlayView @JvmOverloads constructor( maskCanvas!!.drawColor(backgroundColor) maskCanvas!!.drawRoundRect(outerFrame, outerRadius, outerRadius, strokePaint) maskCanvas!!.drawRoundRect(innerFrame, innerRadius, innerRadius, transparentPaint) + if (isLoading) maskCanvas!!.drawRoundRect(innerFrame, innerRadius, innerRadius, loadingBackgroundPaint) canvas.drawBitmap(maskBitmap!!, 0f, 0f, alphaPaint) super.onDraw(canvas) } diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt index a02cae3c..5991fd11 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt @@ -2,11 +2,13 @@ package io.github.g00fy2.quickie import android.Manifest.permission.CAMERA import android.app.Activity +import android.app.Dialog import android.content.Intent import android.content.pm.PackageManager import android.os.Bundle import android.util.Size import android.view.HapticFeedbackConstants +import android.view.KeyEvent import android.view.View import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity @@ -23,7 +25,7 @@ import com.google.mlkit.vision.barcode.Barcode import io.github.g00fy2.quickie.config.ParcelableScannerConfig import io.github.g00fy2.quickie.databinding.QuickieScannerActivityBinding import io.github.g00fy2.quickie.extensions.toParcelableContentType -import io.github.g00fy2.quickie.utils.PlayServicesValidator +import io.github.g00fy2.quickie.utils.MlKitErrorHandler import java.util.concurrent.ExecutorService import java.util.concurrent.Executors @@ -33,6 +35,20 @@ internal class QRScannerActivity : AppCompatActivity() { private lateinit var analysisExecutor: ExecutorService private var barcodeFormats = intArrayOf(Barcode.FORMAT_QR_CODE) private var hapticFeedback = true + internal var errorDialog: Dialog? = null + set(value) { + field = value + value?.show() + value?.setOnKeyListener { dialog, keyCode, _ -> + if (keyCode == KeyEvent.KEYCODE_BACK) { + finish() + dialog.dismiss() + true + } else { + false + } + } + } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -75,15 +91,13 @@ internal class QRScannerActivity : AppCompatActivity() { .also { it.setAnalyzer(analysisExecutor, QRCodeAnalyzer( - barcodeFormats, - { barcode -> + barcodeFormats = barcodeFormats, + onSuccess = { barcode -> it.clearAnalyzer() onSuccess(barcode) }, - { exception -> - it.clearAnalyzer() - onFailure(exception) - } + onFailure = { exception -> onFailure(exception) }, + onPassCompleted = { failureOccurred -> onPassCompleted(failureOccurred) } ) ) } @@ -119,7 +133,11 @@ internal class QRScannerActivity : AppCompatActivity() { private fun onFailure(exception: Exception) { setResult(RESULT_ERROR, Intent().putExtra(EXTRA_RESULT_EXCEPTION, exception)) - if (!PlayServicesValidator.handleGooglePlayServicesError(this, exception)) finish() + if (!MlKitErrorHandler.isResolvableError(this, exception)) finish() + } + + private fun onPassCompleted(failureOccurred: Boolean) { + if (!isFinishing) binding.overlayView.isLoading = failureOccurred } private fun setupEdgeToEdgeUI() { diff --git a/quickie/src/main/res/layout/quickie_progress_view.xml b/quickie/src/main/res/layout/quickie_progress_view.xml new file mode 100644 index 00000000..6d523ad7 --- /dev/null +++ b/quickie/src/main/res/layout/quickie_progress_view.xml @@ -0,0 +1,33 @@ + + + + + + \ No newline at end of file diff --git a/quickie/src/main/res/values-af/strings.xml b/quickie/src/main/res/values-af/strings.xml index 4d9cd69d..82f9c1bd 100644 --- a/quickie/src/main/res/values-af/strings.xml +++ b/quickie/src/main/res/values-af/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skandeer QR-kode" + "Wag asseblief…" diff --git a/quickie/src/main/res/values-am/strings.xml b/quickie/src/main/res/values-am/strings.xml index 93db59d0..d9f67d13 100644 --- a/quickie/src/main/res/values-am/strings.xml +++ b/quickie/src/main/res/values-am/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR ኮድን ይቃኙ" + "እባክዎ ይጠብቁ…" diff --git a/quickie/src/main/res/values-ar/strings.xml b/quickie/src/main/res/values-ar/strings.xml index c062adbd..eb9cfbc6 100644 --- a/quickie/src/main/res/values-ar/strings.xml +++ b/quickie/src/main/res/values-ar/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "مسح رمز الاستجابة السريعة" + "يرجى الانتظار…" diff --git a/quickie/src/main/res/values-as/strings.xml b/quickie/src/main/res/values-as/strings.xml index d0567c7b..0ccb4f18 100644 --- a/quickie/src/main/res/values-as/strings.xml +++ b/quickie/src/main/res/values-as/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "কিউআৰ ক’ড স্কেন কৰক" + "অনুগ্রহ কৰি অপেক্ষা কৰক…" diff --git a/quickie/src/main/res/values-az/strings.xml b/quickie/src/main/res/values-az/strings.xml index c300ca27..d77b8eda 100644 --- a/quickie/src/main/res/values-az/strings.xml +++ b/quickie/src/main/res/values-az/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR kodunu skan edin" + "Lütfən, gözləyin…" diff --git a/quickie/src/main/res/values-be/strings.xml b/quickie/src/main/res/values-be/strings.xml index 64f6c6fb..4d6170fb 100644 --- a/quickie/src/main/res/values-be/strings.xml +++ b/quickie/src/main/res/values-be/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Сканіраваць QR-код" + "Калі ласка, пачакайце…" diff --git a/quickie/src/main/res/values-bg/strings.xml b/quickie/src/main/res/values-bg/strings.xml index cd426b41..9359de3e 100644 --- a/quickie/src/main/res/values-bg/strings.xml +++ b/quickie/src/main/res/values-bg/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Сканиране на QR кода" + "Моля, изчакайте…" diff --git a/quickie/src/main/res/values-bn/strings.xml b/quickie/src/main/res/values-bn/strings.xml index 58cc92bf..c851588a 100644 --- a/quickie/src/main/res/values-bn/strings.xml +++ b/quickie/src/main/res/values-bn/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR কোড স্ক্যান করুন" + "দয়া করে অপেক্ষা করুন…" diff --git a/quickie/src/main/res/values-bs/strings.xml b/quickie/src/main/res/values-bs/strings.xml index 7286c95a..81b25f41 100644 --- a/quickie/src/main/res/values-bs/strings.xml +++ b/quickie/src/main/res/values-bs/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skenirajte QR kôd" + "Pričekajte…" diff --git a/quickie/src/main/res/values-ca/strings.xml b/quickie/src/main/res/values-ca/strings.xml index d059b0f3..bd09856f 100644 --- a/quickie/src/main/res/values-ca/strings.xml +++ b/quickie/src/main/res/values-ca/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Escaneja un codi QR" + "Espera…" diff --git a/quickie/src/main/res/values-cs/strings.xml b/quickie/src/main/res/values-cs/strings.xml index 56fa08ed..8dec0b69 100644 --- a/quickie/src/main/res/values-cs/strings.xml +++ b/quickie/src/main/res/values-cs/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Naskenovat QR kód" + "Prosím čekejte…" diff --git a/quickie/src/main/res/values-da/strings.xml b/quickie/src/main/res/values-da/strings.xml index e2203ee0..fdca72be 100644 --- a/quickie/src/main/res/values-da/strings.xml +++ b/quickie/src/main/res/values-da/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Scan QR-kode" + "Vent et øjeblik…" diff --git a/quickie/src/main/res/values-de/strings.xml b/quickie/src/main/res/values-de/strings.xml index bfde423d..060efa29 100644 --- a/quickie/src/main/res/values-de/strings.xml +++ b/quickie/src/main/res/values-de/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR-Code scannen" + "Bitte warten…" diff --git a/quickie/src/main/res/values-el/strings.xml b/quickie/src/main/res/values-el/strings.xml index c2f48f8d..73e11b92 100644 --- a/quickie/src/main/res/values-el/strings.xml +++ b/quickie/src/main/res/values-el/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Σάρωση κωδικού QR" + "Περιμένετε…" diff --git a/quickie/src/main/res/values-en/strings.xml b/quickie/src/main/res/values-en/strings.xml index 292c5be2..65b6e366 100644 --- a/quickie/src/main/res/values-en/strings.xml +++ b/quickie/src/main/res/values-en/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + Scan QR code + Please wait… diff --git a/quickie/src/main/res/values-es-rUS/strings.xml b/quickie/src/main/res/values-es-rUS/strings.xml index 86f469fa..bc643603 100644 --- a/quickie/src/main/res/values-es-rUS/strings.xml +++ b/quickie/src/main/res/values-es-rUS/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Escanear código QR" + "Espera un momento…" diff --git a/quickie/src/main/res/values-es/strings.xml b/quickie/src/main/res/values-es/strings.xml index 1e4952b8..9c770f68 100644 --- a/quickie/src/main/res/values-es/strings.xml +++ b/quickie/src/main/res/values-es/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Escanea el código QR" + "Espera…" diff --git a/quickie/src/main/res/values-et/strings.xml b/quickie/src/main/res/values-et/strings.xml index 11bd6df1..359156ae 100644 --- a/quickie/src/main/res/values-et/strings.xml +++ b/quickie/src/main/res/values-et/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR-koodi skannimine" + "Oodake…" diff --git a/quickie/src/main/res/values-eu/strings.xml b/quickie/src/main/res/values-eu/strings.xml index 34f845e5..1525a996 100644 --- a/quickie/src/main/res/values-eu/strings.xml +++ b/quickie/src/main/res/values-eu/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Eskaneatu QR kodea" + "Itxaron, mesedez…" diff --git a/quickie/src/main/res/values-fa/strings.xml b/quickie/src/main/res/values-fa/strings.xml index e61b3318..959b0f82 100644 --- a/quickie/src/main/res/values-fa/strings.xml +++ b/quickie/src/main/res/values-fa/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "اسکن رمزینه پاسخ‌سریع" + "لطفاً صبر کنید…" diff --git a/quickie/src/main/res/values-fi/strings.xml b/quickie/src/main/res/values-fi/strings.xml index c295ba30..176e847a 100644 --- a/quickie/src/main/res/values-fi/strings.xml +++ b/quickie/src/main/res/values-fi/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Lue QR-koodi" + "Odota…" diff --git a/quickie/src/main/res/values-fr-rCA/strings.xml b/quickie/src/main/res/values-fr-rCA/strings.xml index 5a55064d..10a0fdcb 100644 --- a/quickie/src/main/res/values-fr-rCA/strings.xml +++ b/quickie/src/main/res/values-fr-rCA/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Numériser le code QR" + "Veuillez patienter…" diff --git a/quickie/src/main/res/values-fr/strings.xml b/quickie/src/main/res/values-fr/strings.xml index 4e00c4bf..393e8de8 100644 --- a/quickie/src/main/res/values-fr/strings.xml +++ b/quickie/src/main/res/values-fr/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Scanner le code QR" + "Veuillez patienter…" diff --git a/quickie/src/main/res/values-gl/strings.xml b/quickie/src/main/res/values-gl/strings.xml index 86f469fa..9647233f 100644 --- a/quickie/src/main/res/values-gl/strings.xml +++ b/quickie/src/main/res/values-gl/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Escanear código QR" + "Agarda…" diff --git a/quickie/src/main/res/values-gu/strings.xml b/quickie/src/main/res/values-gu/strings.xml index c753becc..6aa27b3b 100644 --- a/quickie/src/main/res/values-gu/strings.xml +++ b/quickie/src/main/res/values-gu/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR કોડ સ્કૅન કરો" + "કૃપા કરીને રાહ જુઓ…" diff --git a/quickie/src/main/res/values-hi/strings.xml b/quickie/src/main/res/values-hi/strings.xml index c6555c95..36c43849 100644 --- a/quickie/src/main/res/values-hi/strings.xml +++ b/quickie/src/main/res/values-hi/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR कोड स्कैन करें" + "कृपया प्रतीक्षा करें…" diff --git a/quickie/src/main/res/values-hr/strings.xml b/quickie/src/main/res/values-hr/strings.xml index 7286c95a..81b25f41 100644 --- a/quickie/src/main/res/values-hr/strings.xml +++ b/quickie/src/main/res/values-hr/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skenirajte QR kôd" + "Pričekajte…" diff --git a/quickie/src/main/res/values-hu/strings.xml b/quickie/src/main/res/values-hu/strings.xml index cc0d327f..4a4bde6c 100644 --- a/quickie/src/main/res/values-hu/strings.xml +++ b/quickie/src/main/res/values-hu/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR-kód beolvasása" + "Kérjük, várjon…" diff --git a/quickie/src/main/res/values-hy/strings.xml b/quickie/src/main/res/values-hy/strings.xml index f24945bb..b43d317e 100644 --- a/quickie/src/main/res/values-hy/strings.xml +++ b/quickie/src/main/res/values-hy/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Սկանավորեք QR կոդը" + "Խնդրում ենք սպասել…" diff --git a/quickie/src/main/res/values-in/strings.xml b/quickie/src/main/res/values-in/strings.xml index 43ba0c9c..a8b79d61 100644 --- a/quickie/src/main/res/values-in/strings.xml +++ b/quickie/src/main/res/values-in/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Pindai kode QR" + "Harap tunggu…" diff --git a/quickie/src/main/res/values-is/strings.xml b/quickie/src/main/res/values-is/strings.xml index 97e7aac8..c3dde0e4 100644 --- a/quickie/src/main/res/values-is/strings.xml +++ b/quickie/src/main/res/values-is/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skanna QR-kóða" + "Augnablik…" diff --git a/quickie/src/main/res/values-it/strings.xml b/quickie/src/main/res/values-it/strings.xml index 6dbd57c3..3df2cfe1 100644 --- a/quickie/src/main/res/values-it/strings.xml +++ b/quickie/src/main/res/values-it/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Scansiona codice QR" + "Attendere prego…" diff --git a/quickie/src/main/res/values-iw/strings.xml b/quickie/src/main/res/values-iw/strings.xml index 68fe0cde..dd18a099 100644 --- a/quickie/src/main/res/values-iw/strings.xml +++ b/quickie/src/main/res/values-iw/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "‏סריקת קוד QR" + "אנא המתן…" diff --git a/quickie/src/main/res/values-ja/strings.xml b/quickie/src/main/res/values-ja/strings.xml index bf887ab1..62883ee6 100644 --- a/quickie/src/main/res/values-ja/strings.xml +++ b/quickie/src/main/res/values-ja/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR コードのスキャン" + "お待ちください…" diff --git a/quickie/src/main/res/values-ka/strings.xml b/quickie/src/main/res/values-ka/strings.xml index aef3ac0e..53466f9e 100644 --- a/quickie/src/main/res/values-ka/strings.xml +++ b/quickie/src/main/res/values-ka/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR კოდის სკანირება" + "გთხოვთ, დაელოდოთ…" diff --git a/quickie/src/main/res/values-kk/strings.xml b/quickie/src/main/res/values-kk/strings.xml index f63e3ee1..b42ce954 100644 --- a/quickie/src/main/res/values-kk/strings.xml +++ b/quickie/src/main/res/values-kk/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR кодын сканерлеу" + "Күте тұрыңыз…" diff --git a/quickie/src/main/res/values-km/strings.xml b/quickie/src/main/res/values-km/strings.xml index a4286001..c3d38870 100644 --- a/quickie/src/main/res/values-km/strings.xml +++ b/quickie/src/main/res/values-km/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "ស្កេន​កូដ QR" + "សូម​រង់ចាំ…" diff --git a/quickie/src/main/res/values-kn/strings.xml b/quickie/src/main/res/values-kn/strings.xml index 2e885a57..78c6dbcd 100644 --- a/quickie/src/main/res/values-kn/strings.xml +++ b/quickie/src/main/res/values-kn/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR ಕೋಡ್ ಸ್ಕ್ಯಾನ್ ಮಾಡಿ" + "ದಯವಿಟ್ಟು ನಿರೀಕ್ಷಿಸಿ…" diff --git a/quickie/src/main/res/values-ko/strings.xml b/quickie/src/main/res/values-ko/strings.xml index a7140b29..994261ac 100644 --- a/quickie/src/main/res/values-ko/strings.xml +++ b/quickie/src/main/res/values-ko/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR 코드 스캔" + "잠시 기다려 주세요…" diff --git a/quickie/src/main/res/values-ky/strings.xml b/quickie/src/main/res/values-ky/strings.xml index 9d77036d..5c73b9e4 100644 --- a/quickie/src/main/res/values-ky/strings.xml +++ b/quickie/src/main/res/values-ky/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR кодун скандоо" + "Күтө туруңуз…" diff --git a/quickie/src/main/res/values-lo/strings.xml b/quickie/src/main/res/values-lo/strings.xml index 8997343e..55455b39 100644 --- a/quickie/src/main/res/values-lo/strings.xml +++ b/quickie/src/main/res/values-lo/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "ສະແກນລະຫັດ QR" + "ກະລຸນາລໍຖ້າ…" diff --git a/quickie/src/main/res/values-lt/strings.xml b/quickie/src/main/res/values-lt/strings.xml index a757613a..0b4e2ada 100644 --- a/quickie/src/main/res/values-lt/strings.xml +++ b/quickie/src/main/res/values-lt/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR kodo nuskaitymas" + "Palaukite…" diff --git a/quickie/src/main/res/values-lv/strings.xml b/quickie/src/main/res/values-lv/strings.xml index fe17b1b3..25eb5437 100644 --- a/quickie/src/main/res/values-lv/strings.xml +++ b/quickie/src/main/res/values-lv/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR koda skenēšana" + "Lūdzu, uzgaidiet…" diff --git a/quickie/src/main/res/values-mk/strings.xml b/quickie/src/main/res/values-mk/strings.xml index 95e57863..5041e16c 100644 --- a/quickie/src/main/res/values-mk/strings.xml +++ b/quickie/src/main/res/values-mk/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Скенирајте QR-код" + "Почекајте…" diff --git a/quickie/src/main/res/values-ml/strings.xml b/quickie/src/main/res/values-ml/strings.xml index fa27f10d..8aef56f8 100644 --- a/quickie/src/main/res/values-ml/strings.xml +++ b/quickie/src/main/res/values-ml/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR കോഡ് സ്‌കാൻ ചെയ്യുക" + "കാത്തിരിക്കുക…" diff --git a/quickie/src/main/res/values-mn/strings.xml b/quickie/src/main/res/values-mn/strings.xml index 294f33f6..10da9b36 100644 --- a/quickie/src/main/res/values-mn/strings.xml +++ b/quickie/src/main/res/values-mn/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR кодыг скан хийх" + "Түр хүлээнэ үү…" diff --git a/quickie/src/main/res/values-mr/strings.xml b/quickie/src/main/res/values-mr/strings.xml index 4f0a4f9d..e1258703 100644 --- a/quickie/src/main/res/values-mr/strings.xml +++ b/quickie/src/main/res/values-mr/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR कोड स्कॅन करा" + "कृपया प्रतीक्षा करा…" diff --git a/quickie/src/main/res/values-ms/strings.xml b/quickie/src/main/res/values-ms/strings.xml index 1d7b12c6..4ea0e5fa 100644 --- a/quickie/src/main/res/values-ms/strings.xml +++ b/quickie/src/main/res/values-ms/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Imbas kod QR" + "Sila tunggu…" diff --git a/quickie/src/main/res/values-my/strings.xml b/quickie/src/main/res/values-my/strings.xml index 2668a048..4d1bd9bc 100644 --- a/quickie/src/main/res/values-my/strings.xml +++ b/quickie/src/main/res/values-my/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR ကုဒ်ကို စကင်ဖတ်ပါ" + "ခဏစောင့်ပါ…" diff --git a/quickie/src/main/res/values-nb/strings.xml b/quickie/src/main/res/values-nb/strings.xml index 6b79a2c7..8aca8e47 100644 --- a/quickie/src/main/res/values-nb/strings.xml +++ b/quickie/src/main/res/values-nb/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skann QR-koden" + "Vent litt…" diff --git a/quickie/src/main/res/values-ne/strings.xml b/quickie/src/main/res/values-ne/strings.xml index 6601e1c4..f60fabfb 100644 --- a/quickie/src/main/res/values-ne/strings.xml +++ b/quickie/src/main/res/values-ne/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR कोड स्क्यान गर्नुहोस्" + "कृपया प्रतीक्षा गर्नुहोला…" diff --git a/quickie/src/main/res/values-nl/strings.xml b/quickie/src/main/res/values-nl/strings.xml index 437c3bbf..27eaaa9f 100644 --- a/quickie/src/main/res/values-nl/strings.xml +++ b/quickie/src/main/res/values-nl/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR-code scannen" + "Even geduld…" diff --git a/quickie/src/main/res/values-or/strings.xml b/quickie/src/main/res/values-or/strings.xml index 2758a43a..e92d8fe0 100644 --- a/quickie/src/main/res/values-or/strings.xml +++ b/quickie/src/main/res/values-or/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR କୋଡ୍‍ ସ୍କାନ୍‍ କରନ୍ତୁ" + "ଦୟାକରି ଅପେକ୍ଷା କରନ୍ତୁ…" diff --git a/quickie/src/main/res/values-pa/strings.xml b/quickie/src/main/res/values-pa/strings.xml index 5568b9d3..e1cc9034 100644 --- a/quickie/src/main/res/values-pa/strings.xml +++ b/quickie/src/main/res/values-pa/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR ਕੋਡ ਸਕੈਨ ਕਰੋ" + "ਕਿਰਪਾ ਕਰਕੇ ਠਹਿਰੋ…" diff --git a/quickie/src/main/res/values-pl/strings.xml b/quickie/src/main/res/values-pl/strings.xml index 818ac6fe..836b218c 100644 --- a/quickie/src/main/res/values-pl/strings.xml +++ b/quickie/src/main/res/values-pl/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Zeskanuj kod QR" + "Zaczekaj…" diff --git a/quickie/src/main/res/values-pt/strings.xml b/quickie/src/main/res/values-pt/strings.xml index 7bdfcbb9..41961b3b 100644 --- a/quickie/src/main/res/values-pt/strings.xml +++ b/quickie/src/main/res/values-pt/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Ler código QR" + "Aguarde…" diff --git a/quickie/src/main/res/values-ro/strings.xml b/quickie/src/main/res/values-ro/strings.xml index db10f38c..3a3c1676 100644 --- a/quickie/src/main/res/values-ro/strings.xml +++ b/quickie/src/main/res/values-ro/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Scanați codul QR" + "Așteptați…" diff --git a/quickie/src/main/res/values-ru/strings.xml b/quickie/src/main/res/values-ru/strings.xml index 24f1734e..5749e8da 100644 --- a/quickie/src/main/res/values-ru/strings.xml +++ b/quickie/src/main/res/values-ru/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Сканируйте QR-код" + "Подождите…" diff --git a/quickie/src/main/res/values-si/strings.xml b/quickie/src/main/res/values-si/strings.xml index a1b556cd..bcc5f1de 100644 --- a/quickie/src/main/res/values-si/strings.xml +++ b/quickie/src/main/res/values-si/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR කේතය ස්කෑන් කරන්න" + "කරුණාකර රැඳී සිටින්න…" diff --git a/quickie/src/main/res/values-sk/strings.xml b/quickie/src/main/res/values-sk/strings.xml index 9a845aa8..1653f0dd 100644 --- a/quickie/src/main/res/values-sk/strings.xml +++ b/quickie/src/main/res/values-sk/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skenovanie QR kódu" + "Čakajte…" diff --git a/quickie/src/main/res/values-sl/strings.xml b/quickie/src/main/res/values-sl/strings.xml index 33a3d0d1..92f47af4 100644 --- a/quickie/src/main/res/values-sl/strings.xml +++ b/quickie/src/main/res/values-sl/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Branje kode QR" + "Počakajte…" diff --git a/quickie/src/main/res/values-sq/strings.xml b/quickie/src/main/res/values-sq/strings.xml index 90b13da5..152c6fb0 100644 --- a/quickie/src/main/res/values-sq/strings.xml +++ b/quickie/src/main/res/values-sq/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skano kodin QR" + "Qëndro në pritje…" diff --git a/quickie/src/main/res/values-sr/strings.xml b/quickie/src/main/res/values-sr/strings.xml index 43687cee..8d85c930 100644 --- a/quickie/src/main/res/values-sr/strings.xml +++ b/quickie/src/main/res/values-sr/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Скенирај QR кôд" + "Сачекајте…" diff --git a/quickie/src/main/res/values-sv/strings.xml b/quickie/src/main/res/values-sv/strings.xml index eb3949ed..8c38a83c 100644 --- a/quickie/src/main/res/values-sv/strings.xml +++ b/quickie/src/main/res/values-sv/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skanna QR-kod" + "Vänta…" diff --git a/quickie/src/main/res/values-sw/strings.xml b/quickie/src/main/res/values-sw/strings.xml index 67b84cd2..3485a01d 100644 --- a/quickie/src/main/res/values-sw/strings.xml +++ b/quickie/src/main/res/values-sw/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Changanua msimbo wa QR" + "Tafadhali subiri…" diff --git a/quickie/src/main/res/values-ta/strings.xml b/quickie/src/main/res/values-ta/strings.xml index 12caaf21..099f9d7e 100644 --- a/quickie/src/main/res/values-ta/strings.xml +++ b/quickie/src/main/res/values-ta/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR குறியீட்டை ஸ்கேன் செய்தல்" + "காத்திருக்கவும்…" diff --git a/quickie/src/main/res/values-te/strings.xml b/quickie/src/main/res/values-te/strings.xml index 175b475a..ae31ae83 100644 --- a/quickie/src/main/res/values-te/strings.xml +++ b/quickie/src/main/res/values-te/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR కోడ్‌ని స్కాన్ చేయండి" + "దయచేసి వేచి ఉండండి…" diff --git a/quickie/src/main/res/values-th/strings.xml b/quickie/src/main/res/values-th/strings.xml index 09f0e60a..1a14af6e 100644 --- a/quickie/src/main/res/values-th/strings.xml +++ b/quickie/src/main/res/values-th/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "สแกนคิวอาร์โค้ด" + "โปรดรอสักครู่…" diff --git a/quickie/src/main/res/values-tl/strings.xml b/quickie/src/main/res/values-tl/strings.xml index 0ac276b7..7fdb6aa4 100644 --- a/quickie/src/main/res/values-tl/strings.xml +++ b/quickie/src/main/res/values-tl/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "I-scan ang QR code" + "Mangyaring maghintay…" diff --git a/quickie/src/main/res/values-tr/strings.xml b/quickie/src/main/res/values-tr/strings.xml index 4c42a7a0..568c323a 100644 --- a/quickie/src/main/res/values-tr/strings.xml +++ b/quickie/src/main/res/values-tr/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR kodu tarayın" + "Lütfen bekleyin…" diff --git a/quickie/src/main/res/values-uk/strings.xml b/quickie/src/main/res/values-uk/strings.xml index 620333e5..df5102c2 100644 --- a/quickie/src/main/res/values-uk/strings.xml +++ b/quickie/src/main/res/values-uk/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Відскануйте QR-код" + "Зачекайте…" diff --git a/quickie/src/main/res/values-ur/strings.xml b/quickie/src/main/res/values-ur/strings.xml index d2bbe379..949b99eb 100644 --- a/quickie/src/main/res/values-ur/strings.xml +++ b/quickie/src/main/res/values-ur/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "‏QR کوڈ اسکین کریں" + "براہ کرم انتظار کریں…" diff --git a/quickie/src/main/res/values-uz/strings.xml b/quickie/src/main/res/values-uz/strings.xml index bca304bc..0f639e54 100644 --- a/quickie/src/main/res/values-uz/strings.xml +++ b/quickie/src/main/res/values-uz/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "QR kodni skanerlash" + "Iltimos, kuting…" diff --git a/quickie/src/main/res/values-vi/strings.xml b/quickie/src/main/res/values-vi/strings.xml index 7d4cc581..ffdc1394 100644 --- a/quickie/src/main/res/values-vi/strings.xml +++ b/quickie/src/main/res/values-vi/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Quét mã QR" + "Vui lòng chờ…" diff --git a/quickie/src/main/res/values-zh-rCN/strings.xml b/quickie/src/main/res/values-zh-rCN/strings.xml index ec7fd00d..0fcc33cb 100644 --- a/quickie/src/main/res/values-zh-rCN/strings.xml +++ b/quickie/src/main/res/values-zh-rCN/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "扫描二维码" + "请稍候…" diff --git a/quickie/src/main/res/values-zh-rHK/strings.xml b/quickie/src/main/res/values-zh-rHK/strings.xml index 78b18a95..68f85398 100644 --- a/quickie/src/main/res/values-zh-rHK/strings.xml +++ b/quickie/src/main/res/values-zh-rHK/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "掃瞄二維條碼" + "請稍候…" diff --git a/quickie/src/main/res/values-zh-rTW/strings.xml b/quickie/src/main/res/values-zh-rTW/strings.xml index 763c51e0..a2796acd 100644 --- a/quickie/src/main/res/values-zh-rTW/strings.xml +++ b/quickie/src/main/res/values-zh-rTW/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "掃描 QR 圖碼" + "請稍候…" diff --git a/quickie/src/main/res/values-zu/strings.xml b/quickie/src/main/res/values-zu/strings.xml index 0e77e579..87214c15 100644 --- a/quickie/src/main/res/values-zu/strings.xml +++ b/quickie/src/main/res/values-zu/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + "Skena ikhodi ye-QR" + "Sicela ulinde…" diff --git a/quickie/src/main/res/values/strings.xml b/quickie/src/main/res/values/strings.xml index 292c5be2..65b6e366 100644 --- a/quickie/src/main/res/values/strings.xml +++ b/quickie/src/main/res/values/strings.xml @@ -16,8 +16,10 @@ limitations under the License. This file has been modified by Thomas Wirth to only keep the - wifi_dpp_scan_qr_code wording form the aosp settings app strings. + wifi_dpp_scan_qr_code and master_clear_progress_text wording form the + aosp settings app strings. --> - + Scan QR code + Please wait… diff --git a/quickie/src/unbundled/kotlin/io/github/g00fy2/quickie/utils/PlayServicesValidator.kt b/quickie/src/unbundled/kotlin/io/github/g00fy2/quickie/utils/MlKitErrorHandler.kt similarity index 56% rename from quickie/src/unbundled/kotlin/io/github/g00fy2/quickie/utils/PlayServicesValidator.kt rename to quickie/src/unbundled/kotlin/io/github/g00fy2/quickie/utils/MlKitErrorHandler.kt index 0b6590e1..1db00f09 100644 --- a/quickie/src/unbundled/kotlin/io/github/g00fy2/quickie/utils/PlayServicesValidator.kt +++ b/quickie/src/unbundled/kotlin/io/github/g00fy2/quickie/utils/MlKitErrorHandler.kt @@ -1,30 +1,27 @@ package io.github.g00fy2.quickie.utils -import android.app.Activity import com.google.android.gms.common.ConnectionResult import com.google.android.gms.common.GoogleApiAvailability import com.google.mlkit.common.MlKitException +import io.github.g00fy2.quickie.QRScannerActivity -internal object PlayServicesValidator { +internal object MlKitErrorHandler { // version 20.12.14 (as suggested https://github.com/firebase/firebase-android-sdk/issues/407#issuecomment-632288258) private const val MIN_SERVICES_VERSION = 201214 * 1000 private const val REQUEST_CODE = 9000 - internal fun handleGooglePlayServicesError(activity: Activity, exception: Exception): Boolean { + internal fun isResolvableError(activity: QRScannerActivity, exception: Exception): Boolean { if (exception is MlKitException && exception.errorCode == MlKitException.UNAVAILABLE) { // check if Google Play services is available and its version is at least MIN_SERVICES_VERSION - val resultCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(activity, MIN_SERVICES_VERSION) + val gmsCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(activity, MIN_SERVICES_VERSION) - if (resultCode != ConnectionResult.SUCCESS && - GoogleApiAvailability.getInstance().isUserResolvableError(resultCode) + if (activity.errorDialog?.isShowing != true && gmsCode != ConnectionResult.SUCCESS && + GoogleApiAvailability.getInstance().isUserResolvableError(gmsCode) ) { - GoogleApiAvailability.getInstance().getErrorDialog(activity, resultCode, REQUEST_CODE)?.let { - it.setOnDismissListener { activity.finish() } - it.show() - return true - } + activity.errorDialog = GoogleApiAvailability.getInstance().getErrorDialog(activity, gmsCode, REQUEST_CODE) } + return true } return false } From 04b47d2443c40501a166a2315acf515eb410494b Mon Sep 17 00:00:00 2001 From: Thomas Wirth Date: Tue, 22 Jun 2021 18:16:49 +0200 Subject: [PATCH 3/7] Feature/add torch toggle (#11) * Add initial torch toggle * Add torch toggle configuration * Update comments and readme * Cleanup resources naming * Use srcCompat to set the torch image --- README.md | 11 +++---- .../io/github/g00fy2/quickie/QROverlayView.kt | 11 +++++++ .../g00fy2/quickie/QRScannerActivity.kt | 12 +++++++- .../quickie/config/ParcelableScannerConfig.kt | 3 +- .../g00fy2/quickie/config/ScannerConfig.kt | 12 ++++++-- .../extensions/ScannerConfigExtensions.kt | 3 +- .../color/quickie_bg_torch_color_selector.xml | 7 +++++ .../main/res/drawable/quickie_bg_torch.xml | 12 ++++++++ .../main/res/drawable/quickie_ic_qrcode.xml | 1 + .../main/res/drawable/quickie_ic_torch.xml | 29 +++++++++++++++++++ .../res/layout/quickie_torch_imageview.xml | 14 +++++++++ quickie/src/main/res/values/colors.xml | 2 ++ .../g00fy2/quickiesample/MainActivity.kt | 9 +++--- 13 files changed, 112 insertions(+), 14 deletions(-) create mode 100644 quickie/src/main/res/color/quickie_bg_torch_color_selector.xml create mode 100644 quickie/src/main/res/drawable/quickie_bg_torch.xml create mode 100644 quickie/src/main/res/drawable/quickie_ic_torch.xml create mode 100644 quickie/src/main/res/layout/quickie_torch_imageview.xml diff --git a/README.md b/README.md index 0e998ab2..88b2da93 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Currently, supported subtypes are: See the ML Kit [Barcode documentation](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/Barcode#nested-class-summary) for further details. ### Customization -Use the `ScanCustomCode()` ActivityResultContract to create a configurable barcode scan. When launching the ActivityResultLauncher pass in a `ScannerConfig` object. You can set the supported `BarcodeFormat` list, `overlayStringRes` and `overlayDrawableRes` resource ID and control the `hapticSuccessFeedback`. +Use the `ScanCustomCode()` ActivityResultContract to create a configurable barcode scan. When launching the ActivityResultLauncher pass in a `ScannerConfig` object:
BarcodeFormat options @@ -93,10 +93,11 @@ override fun onCreate(savedInstanceState: Bundle?) { binding.button.setOnClickListener { scanCustomCode.launch( ScannerConfig.build { - setBarcodeFormats(listOf(BarcodeFormat.FORMAT_CODE_128)) - setOverlayStringRes(R.string.scan_barcode) - setOverlayDrawableRes(R.drawable.ic_scan_barcode) - setHapticSuccessFeedback(false) + setBarcodeFormats(listOf(selectedBarcodeFormat)) // set interested barcode formats + setOverlayStringRes(R.string.scan_barcode) // string resource used for the scanner overlay + setOverlayDrawableRes(R.drawable.ic_scan_barcode) // drawable resource used for the scanner overlay + setHapticSuccessFeedback(false) // enable (default) or disable haptic feedback when a barcode was detected + setShowTorchToggle(true) // show or hide (default) a torch toggle button } ) } diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt index 5e3d05e4..1183c109 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QROverlayView.kt @@ -20,6 +20,7 @@ import androidx.core.content.res.ResourcesCompat import androidx.core.graphics.ColorUtils import io.github.g00fy2.quickie.databinding.QuickieProgressViewBinding import io.github.g00fy2.quickie.databinding.QuickieTextviewBinding +import io.github.g00fy2.quickie.databinding.QuickieTorchImageviewBinding import kotlin.math.min import kotlin.math.roundToInt @@ -45,6 +46,7 @@ internal class QROverlayView @JvmOverloads constructor( private val innerFrame = RectF() private val titleTextView = QuickieTextviewBinding.inflate(LayoutInflater.from(context), this, true).root private val progressLinearLayout = QuickieProgressViewBinding.inflate(LayoutInflater.from(context), this, true).root + private val torchImageView = QuickieTorchImageviewBinding.inflate(LayoutInflater.from(context), this, true).root private var maskBitmap: Bitmap? = null private var maskCanvas: Canvas? = null var isHighlighted = false @@ -104,6 +106,15 @@ internal class QROverlayView @JvmOverloads constructor( } } + fun setTorchVisibilityAndOnClick(visible: Boolean, action: (Boolean) -> Unit = {}) { + torchImageView.visibility = if (visible) View.VISIBLE else View.INVISIBLE + torchImageView.setOnClickListener { action(!it.isSelected) } + } + + fun setTorchState(on: Boolean) { + torchImageView.isSelected = on + } + private fun calculateFrameAndTitlePos() { val centralX = width / 2 val centralY = height / 2 diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt index 5991fd11..84126837 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt @@ -16,6 +16,7 @@ import androidx.appcompat.view.ContextThemeWrapper import androidx.camera.core.CameraSelector import androidx.camera.core.ImageAnalysis import androidx.camera.core.Preview +import androidx.camera.core.TorchState import androidx.camera.lifecycle.ProcessCameraProvider import androidx.core.content.ContextCompat import androidx.core.view.ViewCompat @@ -35,6 +36,7 @@ internal class QRScannerActivity : AppCompatActivity() { private lateinit var analysisExecutor: ExecutorService private var barcodeFormats = intArrayOf(Barcode.FORMAT_QR_CODE) private var hapticFeedback = true + private var showTorchToggle = false internal var errorDialog: Dialog? = null set(value) { field = value @@ -104,9 +106,16 @@ internal class QRScannerActivity : AppCompatActivity() { cameraProvider.unbindAll() try { - cameraProvider.bindToLifecycle(this, CameraSelector.DEFAULT_BACK_CAMERA, preview, imageAnalysis) + val camera = cameraProvider.bindToLifecycle(this, CameraSelector.DEFAULT_BACK_CAMERA, preview, imageAnalysis) binding.overlayView.visibility = View.VISIBLE + if (showTorchToggle && camera.cameraInfo.hasFlashUnit()) { + binding.overlayView.setTorchVisibilityAndOnClick(true) { camera.cameraControl.enableTorch(it) } + camera.cameraInfo.torchState.observe(this) { binding.overlayView.setTorchState(it == TorchState.ON) } + } else { + binding.overlayView.setTorchVisibilityAndOnClick(false) + } } catch (e: Exception) { + binding.overlayView.visibility = View.INVISIBLE onFailure(e) } }, ContextCompat.getMainExecutor(this)) @@ -153,6 +162,7 @@ internal class QRScannerActivity : AppCompatActivity() { barcodeFormats = it.formats binding.overlayView.setCustomTextAndIcon(it.stringRes, it.drawableRes) hapticFeedback = it.hapticFeedback + showTorchToggle = it.showTorchToggle } } diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ParcelableScannerConfig.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ParcelableScannerConfig.kt index 1c598e68..f36d0b68 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ParcelableScannerConfig.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ParcelableScannerConfig.kt @@ -8,5 +8,6 @@ internal class ParcelableScannerConfig( val formats: IntArray, val stringRes: Int, val drawableRes: Int, - val hapticFeedback: Boolean + val hapticFeedback: Boolean, + val showTorchToggle: Boolean, ) : Parcelable \ No newline at end of file diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt index 4e482e5f..3be83667 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt @@ -11,6 +11,7 @@ public class ScannerConfig internal constructor( internal val stringRes: Int, internal val drawableRes: Int, internal val hapticFeedback: Boolean, + internal val showTorchToggle: Boolean ) { public class Builder { @@ -18,6 +19,7 @@ public class ScannerConfig internal constructor( private var overlayStringRes: Int = 0 private var overlayDrawableRes: Int = 0 private var hapticSuccessFeedback: Boolean = true + private var showTorchToggle: Boolean = false /** * Set a list of interested barcode formats. List must not be empty. @@ -37,10 +39,15 @@ public class ScannerConfig internal constructor( apply { overlayDrawableRes = drawableRes } /** - * Enable (default) or disable haptic feedback when a barcode code was detected. + * Enable (default) or disable haptic feedback when a barcode was detected. */ public fun setHapticSuccessFeedback(enable: Boolean): Builder = apply { hapticSuccessFeedback = enable } + /** + * Show or hide (default) a torch toggle button. + */ + public fun setShowTorchToggle(enable: Boolean): Builder = apply { showTorchToggle = enable } + /** * Build the BarcodeConfig required by the ScanBarcode ActivityResultContract. */ @@ -49,7 +56,8 @@ public class ScannerConfig internal constructor( barcodeFormats.map { it.value }.toIntArray(), overlayStringRes, overlayDrawableRes, - hapticSuccessFeedback + hapticSuccessFeedback, + showTorchToggle ) } diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/extensions/ScannerConfigExtensions.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/extensions/ScannerConfigExtensions.kt index 3bc78c2c..28bb9d6c 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/extensions/ScannerConfigExtensions.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/extensions/ScannerConfigExtensions.kt @@ -8,5 +8,6 @@ internal fun ScannerConfig.toParcelableConfig() = formats = formats, stringRes = stringRes, drawableRes = drawableRes, - hapticFeedback = hapticFeedback + hapticFeedback = hapticFeedback, + showTorchToggle = showTorchToggle, ) \ No newline at end of file diff --git a/quickie/src/main/res/color/quickie_bg_torch_color_selector.xml b/quickie/src/main/res/color/quickie_bg_torch_color_selector.xml new file mode 100644 index 00000000..e8a84e73 --- /dev/null +++ b/quickie/src/main/res/color/quickie_bg_torch_color_selector.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/quickie/src/main/res/drawable/quickie_bg_torch.xml b/quickie/src/main/res/drawable/quickie_bg_torch.xml new file mode 100644 index 00000000..412c6ded --- /dev/null +++ b/quickie/src/main/res/drawable/quickie_bg_torch.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/quickie/src/main/res/drawable/quickie_ic_qrcode.xml b/quickie/src/main/res/drawable/quickie_ic_qrcode.xml index 43cc296d..6df78d11 100644 --- a/quickie/src/main/res/drawable/quickie_ic_qrcode.xml +++ b/quickie/src/main/res/drawable/quickie_ic_qrcode.xml @@ -1,3 +1,4 @@ + + + + + \ No newline at end of file diff --git a/quickie/src/main/res/layout/quickie_torch_imageview.xml b/quickie/src/main/res/layout/quickie_torch_imageview.xml new file mode 100644 index 00000000..6e7383e3 --- /dev/null +++ b/quickie/src/main/res/layout/quickie_torch_imageview.xml @@ -0,0 +1,14 @@ + + \ No newline at end of file diff --git a/quickie/src/main/res/values/colors.xml b/quickie/src/main/res/values/colors.xml index 15b72d4c..6f060248 100644 --- a/quickie/src/main/res/values/colors.xml +++ b/quickie/src/main/res/values/colors.xml @@ -3,4 +3,6 @@ #dadce0 #ffffff #00000000 + ?attr/colorAccent + @color/quickie_stroke \ No newline at end of file diff --git a/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt b/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt index e3b85ff1..ed85aee8 100644 --- a/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt +++ b/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt @@ -41,10 +41,11 @@ class MainActivity : AppCompatActivity() { binding.customScannerButton.setOnClickListener { scanCustomCode.launch( ScannerConfig.build { - setBarcodeFormats(listOf(selectedBarcodeFormat)) - setOverlayStringRes(R.string.scan_barcode) - setOverlayDrawableRes(R.drawable.ic_scan_barcode) - setHapticSuccessFeedback(false) + setBarcodeFormats(listOf(selectedBarcodeFormat)) // set interested barcode formats + setOverlayStringRes(R.string.scan_barcode) // string resource used for the scanner overlay + setOverlayDrawableRes(R.drawable.ic_scan_barcode) // drawable resource used for the scanner overlay + setHapticSuccessFeedback(false) // enable (default) or disable haptic feedback when a barcode was detected + setShowTorchToggle(true) // show or hide (default) a torch toggle button } ) } From f80279fd0c67a608f506494818040626b01b0772 Mon Sep 17 00:00:00 2001 From: Thomas Wirth Date: Tue, 22 Jun 2021 18:22:22 +0200 Subject: [PATCH 4/7] Update readme and comments --- README.md | 4 ++-- .../kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt | 2 +- .../kotlin/io/github/g00fy2/quickiesample/MainActivity.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 88b2da93..c57eea7a 100644 --- a/README.md +++ b/README.md @@ -93,11 +93,11 @@ override fun onCreate(savedInstanceState: Bundle?) { binding.button.setOnClickListener { scanCustomCode.launch( ScannerConfig.build { - setBarcodeFormats(listOf(selectedBarcodeFormat)) // set interested barcode formats + setBarcodeFormats(listOf(BarcodeFormat.FORMAT_CODE_128)) // set interested barcode formats setOverlayStringRes(R.string.scan_barcode) // string resource used for the scanner overlay setOverlayDrawableRes(R.drawable.ic_scan_barcode) // drawable resource used for the scanner overlay setHapticSuccessFeedback(false) // enable (default) or disable haptic feedback when a barcode was detected - setShowTorchToggle(true) // show or hide (default) a torch toggle button + setShowTorchToggle(true) // show or hide (default) torch/flashlight toggle button } ) } diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt index 3be83667..dd88b595 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/config/ScannerConfig.kt @@ -44,7 +44,7 @@ public class ScannerConfig internal constructor( public fun setHapticSuccessFeedback(enable: Boolean): Builder = apply { hapticSuccessFeedback = enable } /** - * Show or hide (default) a torch toggle button. + * Show or hide (default) torch/flashlight toggle button. */ public fun setShowTorchToggle(enable: Boolean): Builder = apply { showTorchToggle = enable } diff --git a/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt b/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt index ed85aee8..9c7f89ee 100644 --- a/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt +++ b/sample/src/main/kotlin/io/github/g00fy2/quickiesample/MainActivity.kt @@ -45,7 +45,7 @@ class MainActivity : AppCompatActivity() { setOverlayStringRes(R.string.scan_barcode) // string resource used for the scanner overlay setOverlayDrawableRes(R.drawable.ic_scan_barcode) // drawable resource used for the scanner overlay setHapticSuccessFeedback(false) // enable (default) or disable haptic feedback when a barcode was detected - setShowTorchToggle(true) // show or hide (default) a torch toggle button + setShowTorchToggle(true) // show or hide (default) torch/flashlight toggle button } ) } From b86d4c21ee1ed5236c7d464c1288aea149d37fee Mon Sep 17 00:00:00 2001 From: Thomas Wirth Date: Thu, 24 Jun 2021 11:13:25 +0200 Subject: [PATCH 5/7] Set failure timestamp only when error occured --- buildSrc/src/main/kotlin/Versions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 15100933..a795ffbe 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -6,7 +6,7 @@ object Versions { const val androidBuildTools = "30.0.3" const val androidGradle = "4.2.1" - const val kotlin = "1.5.10" + const val kotlin = "1.5.20" const val appcompat = "1.3.0" From b233830ef944aef951f4573a95ddb984b1277de9 Mon Sep 17 00:00:00 2001 From: Thomas Wirth Date: Thu, 24 Jun 2021 11:13:38 +0200 Subject: [PATCH 6/7] Update kotlin --- .../main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt index b65a6d4f..048452a0 100644 --- a/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt +++ b/quickie/src/main/kotlin/io/github/g00fy2/quickie/QRCodeAnalyzer.kt @@ -23,16 +23,17 @@ internal class QRCodeAnalyzer( } BarcodeScanning.getClient(optionsBuilder.build()) } + @Volatile private var failureOccurred = false - private var lastCompletedTime = 0L + private var failureTimestamp = 0L @ExperimentalGetImage override fun analyze(imageProxy: ImageProxy) { if (imageProxy.image == null) return // throttle analysis if error occurred in previous pass - if (failureOccurred && System.currentTimeMillis() - lastCompletedTime < 1000L) { + if (failureOccurred && System.currentTimeMillis() - failureTimestamp < 1000L) { imageProxy.close() return } @@ -42,10 +43,10 @@ internal class QRCodeAnalyzer( .addOnSuccessListener { codes -> codes.mapNotNull { it }.firstOrNull()?.let { onSuccess(it) } } .addOnFailureListener { failureOccurred = true + failureTimestamp = System.currentTimeMillis() onFailure(it) } .addOnCompleteListener { - lastCompletedTime = System.currentTimeMillis() onPassCompleted(failureOccurred) imageProxy.close() } From 9fddc17824f77972ad70dbaa039e39273707b41a Mon Sep 17 00:00:00 2001 From: Thomas Wirth Date: Thu, 24 Jun 2021 19:51:02 +0200 Subject: [PATCH 7/7] Bump version to 1.2.0-rc01 --- README.md | 4 ++-- quickie/build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c57eea7a..e48c96b1 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,10 @@ There are two different flavors available on `mavenCentral()`: | V2 model is used (possibly faster, more accurate) | currently V1 model will be downloaded ```kotlin // bundled: -implementation("io.github.g00fy2.quickie:quickie-bundled:1.1.2") +implementation("io.github.g00fy2.quickie:quickie-bundled:1.2.0-rc01") // unbundled: -implementation("io.github.g00fy2.quickie:quickie-unbundled:1.1.2") +implementation("io.github.g00fy2.quickie:quickie-unbundled:1.2.0-rc01") ``` ## Quick Start diff --git a/quickie/build.gradle.kts b/quickie/build.gradle.kts index ffa238ea..233ea9a1 100644 --- a/quickie/build.gradle.kts +++ b/quickie/build.gradle.kts @@ -43,7 +43,7 @@ dependencies { } group = "io.github.g00fy2.quickie" -version = "1.1.2" +version = "1.2.0-rc01" tasks.register("androidJavadocJar") { archiveClassifier.set("javadoc")