Skip to content

Commit

Permalink
Update 1.3_r3.
Browse files Browse the repository at this point in the history
  • Loading branch information
D4rK7355608 committed Aug 24, 2022
1 parent ebd79b7 commit ef4ab3b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .idea/misc.xml

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

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 1.3_r3:
- Fixed crashes;
- Minor tweaks.

# Version 1.3_r2:
- Fixed crashes;
- Minor tweaks.
Expand Down
11 changes: 4 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ plugins {
}
android {
compileSdk 33
def tagName = '1.3_r2'
def tagName = '1.3_r3'
defaultConfig {
applicationId "com.d4rk.androidtutorials"
minSdk 26
targetSdk 33
versionCode 12
versionCode 13
versionName tagName
multiDexEnabled true
archivesBaseName = "com.d4rk.androidtutorials-v${versionName}"
Expand All @@ -24,15 +24,12 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "bool", "FIREBASE_CRASH_ENABLED", "true"
resValue "bool", "FIREBASE_ANALYTICS_DEACTIVATED", "false"
}
debug {
minifyEnabled true
shrinkResources true
debuggable true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "bool", "FIREBASE_CRASH_ENABLED", "false"
resValue "bool", "FIREBASE_ANALYTICS_DEACTIVATED", "true"
}
}
compileOptions {
Expand All @@ -49,7 +46,7 @@ android {
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:30.3.2')
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.12'
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-perf:20.1.0'
implementation 'com.google.android.gms:play-services-ads:21.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@ import androidx.preference.PreferenceManager
import com.d4rk.androidtutorials.ads.Ads
import com.d4rk.androidtutorials.databinding.ActivityMainBinding
import com.google.firebase.FirebaseApp
import com.google.firebase.analytics.FirebaseAnalytics
import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.ktx.Firebase
class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private lateinit var firebaseAnalytics: FirebaseAnalytics
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
FirebaseApp.initializeApp(this)
@Suppress("UNUSED_VARIABLE")
val splashScreen = installSplashScreen()
firebaseAnalytics = Firebase.analytics
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
val navController by lazy {
Expand All @@ -39,7 +35,6 @@ class MainActivity : AppCompatActivity() {
override fun onShowAdComplete() {
}
})
FirebaseApp.initializeApp(this)
}
@Deprecated("Deprecated in Java", ReplaceWith("moveTaskToBack(true)"))
override fun onBackPressed() {
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/kotlin/com/d4rk/androidtutorials/ads/Ads.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@file:Suppress("DEPRECATION")
package com.d4rk.androidtutorials.ads
import android.app.Activity
import android.app.Application
Expand Down Expand Up @@ -26,6 +27,7 @@ class Ads : Application(), Application.ActivityLifecycleCallbacks, LifecycleObse
ProcessLifecycleOwner.get().lifecycle.addObserver(this)
appOpenAdManager = AppOpenAdManager()
}
@Suppress("SameParameterValue")
@OnLifecycleEvent(Lifecycle.Event.ON_START)
fun onMoveToForeground() {
currentActivity?.let { appOpenAdManager.showAdIfAvailable(it) }
Expand Down Expand Up @@ -75,6 +77,7 @@ class Ads : Application(), Application.ActivityLifecycleCallbacks, LifecycleObse
}
)
}
@Suppress("SameParameterValue")
private fun wasLoadTimeLessThanNHoursAgo(numHours: Long): Boolean {
val dateDifference: Long = Date().time - loadTime
val numMilliSecondsPerHour: Long = 3600000
Expand Down
12 changes: 2 additions & 10 deletions app/src/main/res/drawable-anydpi/ic_share.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="28dp"
android:height="28dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path
android:fillColor="?android:textColorPrimary"
android:pathData="M18 16c-0.79 0-1.5 0.31 -2.03 0.81 L8.91 12.7c0.05-0.23 0.09 -0.46 0.09 -0.7s-0.04-0.47-0.09-0.7l7.05-4.11c0.53 0.5 1.25 0.81 2.04 0.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 0.24 0.04 0.48 0.09 0.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c0.79 0 1.5-0.31 2.04-0.81l7.05 4.12c-0.05 0.22 -0.09 0.45 -0.09 0.69 0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3zm0-12c0.55 0 1 0.45 1 1s-0.45 1-1 1-1-0.45-1-1 0.45-1 1-1zM6 13c-0.55 0-1-0.45-1-1s0.45-1 1-1 1 0.45 1 1-0.45 1-1 1zm12 7c-0.55 0-1-0.45-1-1s0.45-1 1-1 1 0.45 1 1-0.45 1-1 1z" />
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="28dp" android:height="28dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:fillColor="?android:textColorPrimary" android:pathData="M18 16c-0.79 0-1.5 0.31-2.03 0.81L8.91 12.7C8.96 12.47 9 12.24 9 12s-0.04-0.47-0.09-0.7l7.05-4.11C16.49 7.69 17.21 8 18 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 0.24 0.04 0.48 0.09 0.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c0.79 0 1.5-0.31 2.04-0.81l7.05 4.12C15.04 18.53 15 18.76 15 19c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3zm0-12c0.55 0 1 0.45 1 1s-0.45 1-1 1-1-0.45-1-1 0.45-1 1-1zM6 13c-0.55 0-1-0.45-1-1s0.45-1 1-1 1 0.45 1 1-0.45 1-1 1zm12 7c-0.55 0-1-0.45-1-1s0.45-1 1-1 1 0.45 1 1-0.45 1-1 1z"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<string name="buttons">Buttons</string>
<string name="implement_buttons">Implement buttons</string>
<string name="implement_buttons_sum">Discover more things about general buttons and what you can do with them. Learn how to make them look beauty and clean.</string>
<string name="changes" translatable="false"><b>Version 1.3_r2:\n</b>
<string name="changes" translatable="false"><b>Version 1.3_r3:\n</b>
• Fixed crashes;\n
• Minor tweaks.
<br> </br>
Expand Down

0 comments on commit ef4ab3b

Please sign in to comment.