diff --git a/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt b/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt index bee88a1..0848df3 100644 --- a/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt +++ b/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt @@ -4,11 +4,15 @@ import android.databinding.DataBindingUtil import android.os.Bundle import android.support.v7.app.AppCompatActivity +import com.google.android.gms.ads.AdSize +import jackall.overlaymulticounter.Const import jackall.overlaymulticounter.R import jackall.overlaymulticounter.databinding.ActivityMainBinding import jackall.overlaymulticounter.db.CounterRealmHelper +import jackall.overlaymulticounter.utils.AdUtil import jackall.overlaymulticounter.viewmodel.MainViewModel import jackall.overlaymulticounter.vo.Counter +import kotlinx.android.synthetic.main.activity_main.view.* class MainActivity : AppCompatActivity() { @@ -31,4 +35,9 @@ ) } } + + override fun onStart() { + super.onStart() + AdUtil.startBannerAd(this, binding.root.main_banner_frame, AdSize.BANNER, Const.mainBannerUnitId) + } }