Skip to content

Commit

Permalink
Merge pull request #233 from catabriga/master
Browse files Browse the repository at this point in the history
Handle non initialized ad size
  • Loading branch information
gumaciel authored Sep 2, 2024
2 parents 9c12ce9 + d095553 commit 8f75393
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,31 @@ class Banner(
}

fun getWidth() : Int {
return mAdSize.width
if (this::mAdSize.isInitialized) {
return mAdSize.width
}
return 0
}

fun getHeight() : Int{
return mAdSize.height
if (this::mAdSize.isInitialized) {
return mAdSize.height
}
return 0
}

fun getWidthInPixels() : Int{
return mAdSize.getWidthInPixels(activity)
if (this::mAdSize.isInitialized) {
return mAdSize.getWidthInPixels(activity);
}
return 0
}

fun getHeightInPixels() : Int {
return mAdSize.getHeightInPixels(activity)
if (this::mAdSize.isInitialized) {
return mAdSize.getHeightInPixels(activity)
}
return 0
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ package com.poingstudios.godot.admob.core.utils

class PluginConfiguration {
object Constants {
const val PLUGIN_VERSION = "3.0.4"
const val PLUGIN_VERSION = "3.0.5"
}
}

0 comments on commit 8f75393

Please sign in to comment.