Monetization Features

For a more complete overview of the Monetization features please refer to the dedicated section Monetization Features.

As described in "Call the SDK", you first need to initialize the SDK:

  // True for debug mode, false for production mode (set to false when distributing your app)
  private static final Boolean IS_AFADSDK_DEBUG = true;

  // Put your app API key here!
  private static final String YOUR_APP_ID = "MY_APP_ID_HERE";

  // Create instance of the Appsfire Ad SDK
  private static AFAdSDK m_adSdk = AFSDKFactory.getAFAdSDK().

  // Start activity

  protected void onStart() {
    m_adSdk.onStart (this);

  // Stop activity

  protected void onStop() {
Warning: do not forget to remove the Debug Mode when you distribute your app.

Now, in your activity onCreate(), call the prepare() method to tell the SDK to start loading ads.

  // Create activity

    protected void onCreate(Bundle savedInstanceState) {

        // Initialize SDK

That's it, the SDK will initialize and manage sessions, and you are ready to start displaying ads.