Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo Plugins Support › AdMob plugin not visible

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15954

    Ajinkya

    Hi!

    There are no error’s or warnings but the adbanner is not visible on the screen.I have tried setting “visible:true”, but it still doesn’t work.I have tried setting position of the adobject in the c++ code using the setPos() function but it causes an error on android saying “unfortunately the app has stopped working”.Any suggestions will be appriciated.

    //c++ code
        QGraphicsScene *start_screen = new QGraphicsScene();
        QGraphicsView *view = new QGraphicsView(start_screen);
    
        QQmlEngine *engine = new QQmlEngine;
        QQmlComponent component(engine, QUrl::fromLocalFile("admob.qml"));
        QGraphicsObject *adobject = qobject_cast<QGraphicsObject *>(component.create());
        start_screen->addItem(adobject);
    
    
    //admob.qml file:
    import Felgo 3.0
    import QtQuick 2.0
    
     AdMobBanner {
       adUnitId: "ca-app-pub-3940256099942544/6300978111"
       testDeviceIds: [ "8B13477C884FE02E65323XXXXXXXXXX" ]
       banner: AdMobBanner.Smart
       anchors.horizontalCenter: parent.horizontalCenter
       anchors.top: parent.top
     }

     

    #15964

    Günther
    Felgo Team

    Hi Ajinkya!

    The AdMob Plugin is designed to work from QML without any additional C++ code. Can you check if QML integration and usage is correct?
    You can also have a look at the sample integration of the plugin in our PluginDemo.

    Also, for using any of our plugins a valid license-key that activates the desired plugins is required. Plugins are available starting with our indie plan.
    A license key for your app can be created here.

    Best,
    Günther

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded