Installation

You can install our plugin through both urls below, pick the one that suits your development environment. If you are unsure use the first one with ‘https’.

 $ cordova plugin add https://bitbucket.org/widespacegit/cordova-plugin-widespace-sdk.git
$ cordova plugin add git@bitbucket:widespacegit/cordova-plugin-widespace-sdk

Supported Platforms

  • iOS
  • Android

 

Methods

  • widespace.setWidespaceSettings
  • widespace.showBannerAd
  • widespace.showInterstitialAd
  • widespace.closeAd

 

widespace.setWidespaceSettings

Run this before any other method, this is used to configure the Widespace plugin so that you can present ads.

window.plugins.widespace.setWidespaceSettings({
   theBannerSid: widespaceSid.bannerSid,
   theInterstitialSid: widespaceSid.interstitialSid,
   displayBannerTop: false //Choose betweend true/false to display banner at top or bottom of the view. 
});

 

widespace.showBannerAd

Presents a banner in the top or bottom portion of the screen.

window.plugins.widespace.showBannerAd();

 

widespace.showInterstitialAd

Presents an interstitial ad covering the whole screen.

window.plugins.widespace.showInterstitialAd();

 

widespace.closeAd

Closes/dismisses all/any presented ad(s).

window.plugins.widespace.closeAd();

 

Do you have any questions or need further guidance?

Feel free to¬†contact integrations@widespace.com¬†and we’ll do our very best to help you out!

Was this article helpful to you?