Skip to content

Commit

Permalink
chore: fix mistake on setup banner ad
Browse files Browse the repository at this point in the history
  • Loading branch information
JunioJsv committed Nov 9, 2023
1 parent 2d86d73 commit 099d798
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions app/src/main/java/juniojsv/mtk/easy/su/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import kotlinx.coroutines.withContext
import retrofit2.Retrofit
import retrofit2.await
import retrofit2.converter.gson.GsonConverterFactory
import java.util.Timer
import java.util.TimerTask
import kotlin.coroutines.CoroutineContext

class MainActivity : AppCompatActivity(), CoroutineScope {
Expand Down Expand Up @@ -201,18 +199,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
}

private fun onSetupBannerAd() {
fun onLoadNewAd() = launch(Dispatchers.Main) {
binding.mBannerAd.loadAd(AdRequest.Builder().build())
}

Timer().scheduleAtFixedRate(
object : TimerTask() {
override fun run() {
onLoadNewAd()
}
},
0, 3000,
)
binding.mBannerAd.loadAd(AdRequest.Builder().build())
}

private fun onLoadFullScreenAd(onComplete: (error: LoadAdError?) -> Unit) =
Expand Down

0 comments on commit 099d798

Please sign in to comment.