Warning: is_writable(): open_basedir restriction in effect. File(/var/www/clients/client2/web93/web/wp-content/uploads/broken-link-checker/blc-log.txt) is not within the allowed path(s): (/var/www/clients/client1/web15/web:/var/www/clients/client1/web15/private:/var/www/clients/client1/web15/tmp:/var/www/supersonic-knowledge.rtl.co.il/web:/srv/www/supersonic-knowledge.rtl.co.il/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client1/web15/web/wp-content/plugins/broken-link-checker/core/init.php on line 141
Offerwall Integration for Android - Supersonic Knowledge Center

Offerwall Integration for Android

Get up and running with the Offerwall Ad Unit in 4 easy steps:

  1. Implement the Delegate
  2. Initialize the Offerwall Unit
  3. Present the Offerwall
  4. Reward the User

Before You Start

Make sure that you have correctly integrated the Supersonic SDK into your application. Integration is outlined here.

Step 1. Initialize the Offerwall

Once the Offerwall Ad Unit is initialized, you will able to call functions on it. We recommend initializing the Offerwall on application launch.

public class YourActivity extends Activity implements OfferwallListener {
  //Declare the Supersonic Mediation Agent
  private Supersonic mMediationAgent;
  
  public void onCreate(Bundle savedInstanceState) {
  
  super.onCreate(savedInstanceState);
  
  //Get the mediation publisher instance 
  mMediationAgent = SupersonicFactory.getInstance();
  
  //Set the Offerwall Listener
  mMediationAgent.setOfferwallListener(this);
  
  //Set the unique id of your end user.
  String mUserId = "APPLICATION_USER_ID_HERE"; 
  
  //You can set Optional Custom parameters which will be passed to
  your server if you use server-to-server callbacks.
  Map<String, String> owParams = new HashMap<String, String>();
  owParams.put("userType","gamer");
  SupersonicConfig.getConfigObj().setOfferwallCustomParams(owParams);
  
  //You can set optional parameters as well via the .getConfigObj
  SupersonicConfig.getConfigObj().setClientSideCallbacks(true);
  
  //Init Offerwall
  mMediationAgent.initOfferwall(this, mAppKey, mUserId);
  }
}