Skip to content

Commit 04b4671

Browse files
committed
feat: add MyApp class to initialize MobileAds
This commit introduces the `MyApp` class, extending `Application`, to initialize the Google Mobile Ads SDK upon application startup.
1 parent 7e4db3e commit 04b4671

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • app/src/main/java/com/ahmadabuhasan/qrbarcode
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.ahmadabuhasan.qrbarcode
2+
3+
import android.app.Application
4+
import com.google.android.gms.ads.MobileAds
5+
6+
class MyApp : Application() {
7+
8+
override fun onCreate() {
9+
super.onCreate()
10+
MobileAds.initialize(this)
11+
}
12+
}

0 commit comments

Comments
 (0)