Skip to content

Commit

Permalink
Support disabling lock on initial tag writing
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Dec 8, 2024
1 parent 881345c commit 6f50954
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github: AbandonedCart
buy_me_a_coffee: abandonedcart
custom: ['https://paypal.me/twistedumbrella']
custom: ['https://tagmo.gitlab.io/donate.html']
12 changes: 7 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ plugins {
android {
defaultConfig {
applicationId 'com.hiddenramblings.tagmo'
compileSdk 34
compileSdk 35
minSdk 21
targetSdk 34
versionName "4.2.7"
targetSdk 35
versionName "4.2.8"
versionCode = versionName.replace(".","").toInteger() * 10

vectorDrawables {
Expand Down Expand Up @@ -103,6 +103,7 @@ android {
jvmTarget = javaVersion.toString()
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility javaVersion
targetCompatibility javaVersion
}
Expand All @@ -121,6 +122,7 @@ android {
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3'
implementation 'androidx.activity:activity-ktx:1.9.3'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation "androidx.browser:browser:1.8.0"
Expand All @@ -130,7 +132,7 @@ dependencies {
implementation "androidx.camera:camera-lifecycle:$androidx_camera"
implementation "androidx.camera:camera-view:$androidx_camera"
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation 'androidx.fragment:fragment-ktx:1.8.5'
implementation 'androidx.preference:preference-ktx:1.2.1'
Expand All @@ -148,7 +150,7 @@ dependencies {

implementation 'com.google.android.flexbox:flexbox:3.0.0'
// Required for Lollipop Amiibo API download compatibility
implementation 'com.google.android.gms:play-services-basement:18.4.0'
implementation 'com.google.android.gms:play-services-basement:18.5.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.android.play:app-update-ktx:2.1.0'
// implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
onUpdateTagResult.launch(scan.apply {
action = NFCIntent.ACTION_WRITE_TAG_FULL
putExtras(Bundle().apply {
putBoolean(NFCIntent.EXTRA_SKIP_LOCK_INFO, skipLockInfo)
putByteArray(NFCIntent.EXTRA_TAG_DATA, tagData)
})
})
Expand Down Expand Up @@ -1308,6 +1309,7 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
R.id.mnu_write -> {
args.putByteArray(NFCIntent.EXTRA_TAG_DATA, tagData)
scan.action = NFCIntent.ACTION_WRITE_TAG_FULL
scan.putExtra(NFCIntent.EXTRA_SKIP_LOCK_INFO, skipLockInfo)
try {
fragment.onUpdateTagResult.launch(scan.putExtras(args))
} catch (_: IllegalStateException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package com.hiddenramblings.tagmo.eightbit.widget

import android.content.Context
import android.graphics.Color
import android.graphics.drawable.AnimationDrawable
import android.graphics.drawable.ColorDrawable
import android.view.LayoutInflater
import android.widget.ImageView
Expand All @@ -30,7 +29,6 @@ import java.lang.ref.SoftReference
object ProgressAlert {
private var dialog: AlertDialog? = null
private var messageText: SoftReference<TextView>? = null
private var uploading: AnimationDrawable? = null

fun show(context: Context, message: String, imageUrk: String? = null) : ProgressAlert {
if (dialog == null) {
Expand Down Expand Up @@ -64,7 +62,7 @@ object ProgressAlert {

@Suppress("unused")
val isShowing: Boolean
get() = dialog?.isShowing ?: false
get() = dialog?.isShowing == true

fun dismiss() {
dialog?.dismiss()
Expand Down

0 comments on commit 6f50954

Please sign in to comment.