Skip to content

Commit

Permalink
Update 3.1_r1
Browse files Browse the repository at this point in the history
  • Loading branch information
D4rK7355608 committed Aug 16, 2023
1 parent ee9f5d6 commit 724ada4
Show file tree
Hide file tree
Showing 57 changed files with 861 additions and 551 deletions.
17 changes: 17 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Version 3.0_r2:
- Made minor under-the-hood improvements for a better overall app experience.
# Version 3.1_r1:
- Added a new support page to show appreciation and gratitude to the developer.
- Fixed various bugs and improved readability, consistency, app performance, and responsiveness by optimizing and styling the outdated code.
- Made various project structure enhancements for better readability and maintainability.
- Made various under-the-hood improvements for a better overall app experience.

# Version 3.0_r1:
- Added a new startup screen for new users.
Expand Down
99 changes: 0 additions & 99 deletions app/build.gradle

This file was deleted.

101 changes: 101 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("com.google.android.gms.oss-licenses-plugin")
id("com.google.devtools.ksp")
}
android {
compileSdk = 34
namespace = "com.d4rk.qrcodescanner.plus"
defaultConfig {
applicationId = "com.d4rk.qrcodescanner.plus"
minSdk = 26
targetSdk = 34
versionCode = 30
versionName = "3.1_r1"
archivesName = "${applicationId}-v${versionName}"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
resourceConfigurations += listOf("en", "de", "es", "fr", "hi", "hu", "in", "it", "ja", "ro", "ru", "tr", "sv", "bg", "pl", "uk")
}
buildTypes {
getByName("release") {
multiDexEnabled = true
isMinifyEnabled = true
isShrinkResources = true
isDebuggable = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
getByName("debug") {
multiDexEnabled = true
isMinifyEnabled = true
isShrinkResources = true
isDebuggable = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
viewBinding = true
buildConfig = true
}
bundle {
storeArchive {
enable = true
}
}
}
dependencies {
implementation("com.google.android.play:review-ktx:2.0.1")
implementation("com.google.android.play:app-update-ktx:2.1.0")
implementation("com.google.firebase:firebase-crashlytics-ktx:18.4.0")
implementation("com.google.firebase:firebase-analytics-ktx:21.3.0")
implementation("com.google.firebase:firebase-perf:20.4.0")
implementation("com.google.android.play:review-ktx:2.0.1")
implementation("com.googlecode.ez-vcard:ez-vcard:0.12.0")
implementation("com.google.android.material:material:1.9.0")
implementation("com.google.android.gms:play-services-oss-licenses:17.0.1")
implementation("com.google.android.gms:play-services-ads:22.2.0")
implementation("com.android.billingclient:billing:6.0.1")
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.0")
implementation("androidx.navigation:navigation-ui-ktx:2.7.0")
implementation("androidx.gridlayout:gridlayout:1.0.0")
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.lifecycle:lifecycle-process:2.6.1")
implementation("androidx.lifecycle:lifecycle-common-java8:2.6.1")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1")
implementation("androidx.multidex:multidex:2.0.1")
implementation("androidx.room:room-runtime:2.5.2")
implementation("androidx.room:room-rxjava2:2.5.2")
implementation("android.arch.paging:runtime:1.0.1")
implementation("android.arch.paging:rxjava2:1.0.1")
implementation("com.github.yuriy-budiyev:code-scanner:2.3.2")
implementation("com.github.florent37:singledateandtimepicker:2.2.8")
implementation("com.airbnb.android:lottie:6.1.0")
implementation("com.journeyapps:zxing-android-embedded:4.3.0")
implementation("com.jakewharton.rxbinding2:rxbinding-appcompat-v7-kotlin:2.2.0")
implementation("com.mayank:simplecropview:1.0.0")
implementation("commons-codec:commons-codec:1.16.0")
implementation("dev.turingcomplete:kotlin-onetimepassword:2.4.0")
implementation("io.reactivex.rxjava2:rxkotlin:2.4.0")
implementation("me.zhanghai.android.fastscroll:library:1.3.0")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
testImplementation("junit:junit:4.13.2")
ksp("androidx.room:room-compiler:2.5.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}
9 changes: 8 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
<uses-permission android:name="com.android.vending.BILLING"/>
<uses-permission android:name="android.permission.CAMERA" tools:ignore="PermissionImpliesUnsupportedChromeOsHardware"/>
<uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
Expand All @@ -26,7 +27,7 @@
</intent>
</queries>
<application
android:name=".ads.managers.AppOpenAdManager"
android:name=".ads.managers.ApplicationOpenAdManager"
android:label="@string/app_name"
android:description="@string/app_description"
android:icon="@mipmap/ic_launcher"
Expand All @@ -38,6 +39,7 @@
android:appCategory="image"
android:theme="@style/AppThemeActionBar"
android:localeConfig="@xml/locales_config"
android:requestLegacyExternalStorage="true"
tools:targetApi="33">
<activity
android:name=".ui.startup.StartupActivity"
Expand Down Expand Up @@ -164,6 +166,11 @@
android:configChanges="orientation|screenSize"
android:label="@string/permissions"
android:parentActivityName=".ui.settings.permissions.PermissionsActivity"/>
<activity
android:name=".ui.settings.support.SupportActivity"
android:exported="false"
android:label="@string/support_us"
android:parentActivityName=".ui.settings.support.SupportActivity"/>
<service
android:name=".feature.tile.QuickSettingsTileService"
android:exported="true"
Expand Down
11 changes: 1 addition & 10 deletions app/src/main/kotlin/com/d4rk/qrcodescanner/plus/App.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
package com.d4rk.qrcodescanner.plus
import androidx.multidex.MultiDexApplication
import com.d4rk.qrcodescanner.plus.di.settings
class App : MultiDexApplication() {
override fun onCreate() {
applyTheme()
super.onCreate()
}
private fun applyTheme() {
settings.reapplyTheme()
}
}
class App : MultiDexApplication()
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.google.android.gms.ads.MobileAds
import com.google.android.gms.ads.appopen.AppOpenAd
import java.util.Date
private const val AD_UNIT_ID = "ca-app-pub-5294151573817700/8044468099"
class AppOpenAdManager : MultiDexApplication(), Application.ActivityLifecycleCallbacks, LifecycleObserver {
class ApplicationOpenAdManager : MultiDexApplication(), Application.ActivityLifecycleCallbacks, LifecycleObserver {
private lateinit var appOpenAdManager: AppOpenAdManager
private var currentActivity: Activity? = null
override fun onCreate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fun BarcodeFormat.toStringId(): Int {
}
fun BarcodeFormat.toImageId(): Int {
return when (this) {
BarcodeFormat.QR_CODE -> R.drawable.ic_qr_code
BarcodeFormat.QR_CODE -> R.drawable.ic_qr_code_white
BarcodeFormat.DATA_MATRIX -> R.drawable.ic_data_matrix
BarcodeFormat.AZTEC -> R.drawable.ic_aztec
BarcodeFormat.PDF_417 -> R.drawable.ic_pdf417
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.os.Bundle
import android.provider.CalendarContract
import android.provider.ContactsContract
import android.provider.Settings
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.print.PrintHelper
Expand Down Expand Up @@ -41,6 +42,8 @@ import com.d4rk.qrcodescanner.plus.model.SearchEngine
import com.d4rk.qrcodescanner.plus.model.schema.BarcodeSchema
import com.d4rk.qrcodescanner.plus.model.schema.OtpAuth
import com.d4rk.qrcodescanner.plus.usecase.save
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.MobileAds
import com.google.android.material.snackbar.Snackbar
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable
Expand Down Expand Up @@ -91,6 +94,8 @@ class BarcodeActivity : BaseActivity(), DeleteConfirmationDialogFragment.Listene
showBarcode()
showOrHideButtons()
showButtonText()
MobileAds.initialize(this)
binding.adView.loadAd(AdRequest.Builder().build())
FastScrollerBuilder(binding.scrollView).useMd2Style().build()
}
override fun onDeleteConfirmed() {
Expand Down Expand Up @@ -556,7 +561,7 @@ class BarcodeActivity : BaseActivity(), DeleteConfirmationDialogFragment.Listene
binding.imageViewBarcode.setImageBitmap(bitmap)
binding.imageViewBarcode.setBackgroundColor(settings.barcodeBackgroundColor)
binding.layoutBarcodeImageBackground.setBackgroundColor(settings.barcodeBackgroundColor)
if (settings.isDarkTheme.not() || settings.areBarcodeColorsInversed) {
if (AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO || settings.areBarcodeColorsInversed) {
binding.layoutBarcodeImageBackground.setPadding(0, 0, 0, 0)
}
} catch (ex: Exception) {
Expand Down
Loading

0 comments on commit 724ada4

Please sign in to comment.