Skip to content

Some suggestions #27

@vdaele

Description

@vdaele

First of all, thank you for this library. It has been really helpful!

I do have a number of suggestions:

  1. From Google Mobile Ads SDK version 17.0.0 onwards, it is required to add the following to the AndroidManifest
<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
  1. The widthChanged/heightChanged signals of an AdMobBanner are not sent when a banner is loaded (=> I had to fetch the width/height in the onLoaded signal)

  2. The x,y QML properties of an AdMobBanner uses device dependent pixels while the rest of the QML application uses device independent pixels (especially when using QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling) )
    Hence in order to position the banner at the bottom I had to set

y = parent.height*Screen.devicePixelRatio - banner.height

which is slightly inconvenient. It would be useful if the QML-user could use device independent pixels for x and y (and also get device independent values for the banner width/height; these should be divided by Screen.devicePixelRatiobefore returning them to the user)

  1. And we can go even one step further: the x/y currently refer to the global coordinates. So if I want to position an AdMobBanner at the bottom of a QML Item that is not full screen, I first have to do something like var globalBottom = root.mapToGlobal(0, root.height).y. Again, it would be convenient if this could be handled by the library. By doing so, the user could use both device independent pixels and the local coordinates of the parent Item of the AdMobBanner

  2. Finally, I had to modify QtAdMobActivity.GetStatusBarHeight and let it return statusBarHeight, otherwise the AdMobBanner was hidden behind the status bar when positioning it at (0,0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions