Follow

Advanced Usage - Customizing your Banner

View original article on our GitHub

You can show a specific banner type, or hide the banner in a specific screen or during a specific scene.

Selecting Banner Type

There are 3 different types of banners:

Banner Type Description
Automatic Banner(Recommended) Automatic selects the most suitable banner of the two listed below
Standard (2D) Banner A standard (two dimensional) banner
3D Banner A three dimensional rotating banner

We highly recommend adding an Automatic banner, which automatically selects whether to display a standard banner or a 3D banner. The banner remains displayed throughout the entire activity life-cycle.

To add a banner to your application add the following code in the appropriate place:

1. Import the SDK namespace

using StartApp;

2. Display the banner

void Start () {
     #if UNITY_ANDROID
     StartAppWrapper.addBanner( 
           StartAppWrapper.BannerType.AUTOMATIC,
           StartAppWrapper.BannerPosition.BOTTOM);
     #endif
}

Parameters

BannerType - type of banner. Can receive one of the following:
StartAppWrapper.BannerType.AUTOMATIC
StartAppWrapper.BannerType.STANDARD
StartAppWrapper.BannerType.THREED

BannerPosition - position of the banner. Can receive one of the following:
StartAppWrapper.BannerPosition.BOTTOM
StartAppWrapper.BannerPosition.TOP

Hiding the Banner

In order to hide an already displayed banner, use the removeBanner() method. Simply pass the position of the banner you want to hide.

For example:

#if UNITY_ANDROID
StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.BOTTOM);
#endif
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments