mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-13 22:40:28 -06:00
Add try catch to initialize MobileAds SDK (#2497)
This commit is contained in:
parent
e17129efea
commit
c9a42a6cf6
@ -93,8 +93,12 @@ class AdsHelper @Inject constructor(
|
|||||||
private fun initializeMobileAds() {
|
private fun initializeMobileAds() {
|
||||||
if (isMobileAdsInitializeCalled.getAndSet(true)) return
|
if (isMobileAdsInitializeCalled.getAndSet(true)) return
|
||||||
|
|
||||||
MobileAds.initialize(context) {
|
try {
|
||||||
isMobileAdsSdkInitialized.value = true
|
MobileAds.initialize(context) {
|
||||||
|
isMobileAdsSdkInitialized.value = true
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Timber.e(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user