From 1e8c96d17f3bfb64de883aa0534df70cd4a75b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Mon, 19 Aug 2024 17:38:25 +0200 Subject: [PATCH 1/6] Increase `versionCode` as an attempt to fix Google Play issues --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 28a2c6c..794ce32 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,7 +12,7 @@ android { compileSdk 34 targetSdkVersion 34 multiDexEnabled true - versionCode 43 + versionCode 44 versionName "4.6.1" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' buildFeatures.dataBinding = true From e8a33487da8cf6e9d7d456337b5de947a1ff1115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Mon, 19 Aug 2024 18:22:14 +0200 Subject: [PATCH 2/6] Increase `versionCode` as an attempt to fix Google Play issues --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 794ce32..f79952c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,7 +12,7 @@ android { compileSdk 34 targetSdkVersion 34 multiDexEnabled true - versionCode 44 + versionCode 45 versionName "4.6.1" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' buildFeatures.dataBinding = true From 4a0c21ca5a511675a18581fab1ad3997f951c2b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Tue, 20 Aug 2024 15:22:24 +0200 Subject: [PATCH 3/6] Remove `TelEnterActivity` --- app/src/main/AndroidManifest.xml | 5 -- .../QrGeneratorOverviewActivity.java | 9 ++- .../generator/TelEnterActivity.java | 57 ------------------- 3 files changed, 8 insertions(+), 63 deletions(-) delete mode 100644 app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 471da6e..bcfcdb3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -99,11 +99,6 @@ android:label="E-Mail" android:parentActivityName=".ui.activities.generator.QrGeneratorOverviewActivity" android:windowSoftInputMode="adjustResize" /> - value != 3).mapToObj(value -> finalGenerator[value]).toList().toArray(String[]::new); + icons = IntStream.range(0, finalIcons.length).filter(value -> value != 3).mapToObj(value -> finalIcons[value]).toList().toArray(Integer[]::new); GeneratorListAdapter adapter = new GeneratorListAdapter(this, generator, icons); listView.setAdapter(adapter); listView.setOnItemClickListener((parent, view, position, id) -> { + // Skip position 3 for Google Play version + if (position >= 3) position++; Intent intent = switch (position) { case 0 -> new Intent(QrGeneratorOverviewActivity.this, TextEnterActivity.class); case 1 -> new Intent(QrGeneratorOverviewActivity.this, MailEnterActivity.class); case 2 -> new Intent(QrGeneratorOverviewActivity.this, UrlEnterActivity.class); - case 3 -> new Intent(QrGeneratorOverviewActivity.this, TelEnterActivity.class); case 4 -> new Intent(QrGeneratorOverviewActivity.this, SmsEnterActivity.class); case 5 -> new Intent(QrGeneratorOverviewActivity.this, GeoLocationEnterActivity.class); case 6 -> new Intent(QrGeneratorOverviewActivity.this, MeCardEnterActivity.class); diff --git a/app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java b/app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java deleted file mode 100644 index 63c8fe8..0000000 --- a/app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.secuso.privacyfriendlycodescanner.qrscanner.ui.activities.generator; - -import android.content.Intent; -import android.database.Cursor; -import android.net.Uri; -import android.os.Bundle; -import android.provider.ContactsContract; -import android.text.InputFilter; -import android.view.View; -import android.widget.EditText; -import android.widget.Toast; - -import androidx.appcompat.app.AppCompatActivity; -import androidx.constraintlayout.widget.ConstraintLayout; - -import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton; -import com.secuso.privacyfriendlycodescanner.qrscanner.R; -import com.secuso.privacyfriendlycodescanner.qrscanner.generator.Contents; -import com.secuso.privacyfriendlycodescanner.qrscanner.ui.helpers.GeneratorKeyboardListener; - -public class TelEnterActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_tel_enter); - - final EditText qrResult = (EditText) findViewById(R.id.editPhone); - - int maxLength = 75; - qrResult.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)}); - - ExtendedFloatingActionButton generate = (ExtendedFloatingActionButton) findViewById(R.id.btnGenerate); - - ConstraintLayout rootView = (ConstraintLayout) findViewById(R.id.rootView); - GeneratorKeyboardListener listener = new GeneratorKeyboardListener(rootView, generate, R.id.btnGenerate, getApplicationContext().getResources().getDisplayMetrics().densityDpi); - rootView.getViewTreeObserver().addOnGlobalLayoutListener(listener); - - generate.setOnClickListener(new View.OnClickListener() { - String result; - - @Override - public void onClick(View v) { - result = qrResult.getText().toString(); - if (result.isEmpty()) { - Toast.makeText(TelEnterActivity.this, R.string.activity_enter_toast_missing_data, Toast.LENGTH_SHORT).show(); - return; - } - Intent i = new Intent(TelEnterActivity.this, QrGeneratorDisplayActivity.class); - i.putExtra("gn", result); - i.putExtra("type", Contents.Type.PHONE); - startActivity(i); - } - - }); - } -} From c9d000495dc44778b106f2dee7ee802816cbdc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Tue, 20 Aug 2024 15:23:34 +0200 Subject: [PATCH 4/6] Bump version to 4.6.2 (46) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f79952c..f8e8026 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { compileSdk 34 targetSdkVersion 34 multiDexEnabled true - versionCode 45 - versionName "4.6.1" + versionCode 46 + versionName "4.6.2" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' buildFeatures.dataBinding = true vectorDrawables.useSupportLibrary = true From edb0de9af9b7bcd6787ca7cee885ae5cebf9ed5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Tue, 20 Aug 2024 17:19:15 +0200 Subject: [PATCH 5/6] Revert "Remove `TelEnterActivity`" This reverts commit 4a0c21ca5a511675a18581fab1ad3997f951c2b0. --- app/src/main/AndroidManifest.xml | 5 ++ .../QrGeneratorOverviewActivity.java | 9 +-- .../generator/TelEnterActivity.java | 57 +++++++++++++++++++ 3 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bcfcdb3..471da6e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -99,6 +99,11 @@ android:label="E-Mail" android:parentActivityName=".ui.activities.generator.QrGeneratorOverviewActivity" android:windowSoftInputMode="adjustResize" /> + value != 3).mapToObj(value -> finalGenerator[value]).toList().toArray(String[]::new); - icons = IntStream.range(0, finalIcons.length).filter(value -> value != 3).mapToObj(value -> finalIcons[value]).toList().toArray(Integer[]::new); GeneratorListAdapter adapter = new GeneratorListAdapter(this, generator, icons); listView.setAdapter(adapter); listView.setOnItemClickListener((parent, view, position, id) -> { - // Skip position 3 for Google Play version - if (position >= 3) position++; Intent intent = switch (position) { case 0 -> new Intent(QrGeneratorOverviewActivity.this, TextEnterActivity.class); case 1 -> new Intent(QrGeneratorOverviewActivity.this, MailEnterActivity.class); case 2 -> new Intent(QrGeneratorOverviewActivity.this, UrlEnterActivity.class); + case 3 -> new Intent(QrGeneratorOverviewActivity.this, TelEnterActivity.class); case 4 -> new Intent(QrGeneratorOverviewActivity.this, SmsEnterActivity.class); case 5 -> new Intent(QrGeneratorOverviewActivity.this, GeoLocationEnterActivity.class); case 6 -> new Intent(QrGeneratorOverviewActivity.this, MeCardEnterActivity.class); diff --git a/app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java b/app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java new file mode 100644 index 0000000..63c8fe8 --- /dev/null +++ b/app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/generator/TelEnterActivity.java @@ -0,0 +1,57 @@ +package com.secuso.privacyfriendlycodescanner.qrscanner.ui.activities.generator; + +import android.content.Intent; +import android.database.Cursor; +import android.net.Uri; +import android.os.Bundle; +import android.provider.ContactsContract; +import android.text.InputFilter; +import android.view.View; +import android.widget.EditText; +import android.widget.Toast; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.constraintlayout.widget.ConstraintLayout; + +import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton; +import com.secuso.privacyfriendlycodescanner.qrscanner.R; +import com.secuso.privacyfriendlycodescanner.qrscanner.generator.Contents; +import com.secuso.privacyfriendlycodescanner.qrscanner.ui.helpers.GeneratorKeyboardListener; + +public class TelEnterActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_tel_enter); + + final EditText qrResult = (EditText) findViewById(R.id.editPhone); + + int maxLength = 75; + qrResult.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)}); + + ExtendedFloatingActionButton generate = (ExtendedFloatingActionButton) findViewById(R.id.btnGenerate); + + ConstraintLayout rootView = (ConstraintLayout) findViewById(R.id.rootView); + GeneratorKeyboardListener listener = new GeneratorKeyboardListener(rootView, generate, R.id.btnGenerate, getApplicationContext().getResources().getDisplayMetrics().densityDpi); + rootView.getViewTreeObserver().addOnGlobalLayoutListener(listener); + + generate.setOnClickListener(new View.OnClickListener() { + String result; + + @Override + public void onClick(View v) { + result = qrResult.getText().toString(); + if (result.isEmpty()) { + Toast.makeText(TelEnterActivity.this, R.string.activity_enter_toast_missing_data, Toast.LENGTH_SHORT).show(); + return; + } + Intent i = new Intent(TelEnterActivity.this, QrGeneratorDisplayActivity.class); + i.putExtra("gn", result); + i.putExtra("type", Contents.Type.PHONE); + startActivity(i); + } + + }); + } +} From 85b90b744b0eafc55108d8270c4587843fa1f3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Tue, 20 Aug 2024 17:21:34 +0200 Subject: [PATCH 6/6] Bump version to 4.6.3 (47) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f8e8026..f485620 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { compileSdk 34 targetSdkVersion 34 multiDexEnabled true - versionCode 46 - versionName "4.6.2" + versionCode 47 + versionName "4.6.3" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' buildFeatures.dataBinding = true vectorDrawables.useSupportLibrary = true