Skip to content

Commit b097d94

Browse files
committed
init ads in about
1 parent e9fc395 commit b097d94

File tree

2 files changed

+8
-1
lines changed
  • buildSrc/src/main/kotlin
  • design/src/main/java/com/github/oezeb/cypher_connect/design

2 files changed

+8
-1
lines changed

buildSrc/src/main/kotlin/Helpers.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fun Project.setupCore() {
5959
setupCommon()
6060
android.apply {
6161
defaultConfig {
62-
versionCode = 4
62+
versionCode = 6
6363
versionName = "1.0.2"
6464
}
6565
compileOptions.isCoreLibraryDesugaringEnabled = true

design/src/main/java/com/github/oezeb/cypher_connect/design/About.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import android.view.View
66
import android.widget.TextView
77
import androidx.appcompat.app.AppCompatActivity
88
import androidx.core.text.HtmlCompat
9+
import com.google.android.gms.ads.AdRequest
10+
import com.google.android.gms.ads.AdView
11+
import com.google.android.gms.ads.MobileAds
912

1013
class About : AppCompatActivity() {
1114
override fun onCreate(savedInstanceState: Bundle?) {
@@ -19,6 +22,10 @@ class About : AppCompatActivity() {
1922
}
2023

2124
findViewById<TextView>(R.id.title).apply { text = getString(R.string.about) }
25+
26+
// Initialize the Mobile Ads SDK
27+
MobileAds.initialize(this)
28+
findViewById<AdView>(R.id.bannerAdView).apply { loadAd(AdRequest.Builder().build()) }
2229
}
2330

2431
fun back(view: View) = finish()

0 commit comments

Comments
 (0)