Firebase banner ad - way of makine smart banner

Firebase banner ad - way of makine smart banner
0

#1

Hello everyone,
I’ve implemented the firebase and using admob, i’m following the tutorial on firebase site. here : [https://firebase.google.com/docs/admob/cpp/cocos2d-x]

My purpose is to make banner ad act as smart banner but couldn’t find specific setting. If there is no specific way how can i make it like smart banner ? While i try i can’t set banner’s width more than 550, if make it bigger than 550 wont be displayed. tried with following code ;

   banner_view = new firebase::admob::BannerView();
   firebase::admob::AdSize ad_size;
   ad_size.ad_size_type = firebase::admob::kAdSizeStandard;
   ad_size.width = 550;
   ad_size.height = 50;

Thanks in advance.


#3

Well as it seem the problem caused by orientation change on start, So that i can’t change the size of banner more than 550.
To solve this issue i have added the following line ;

             banner_view->MoveTo(firebase::admob::BannerView::kPositionTop);

right aftter

             banner_view->Show();

then resize afterwards.