0

I've been trying to add AirPush's new SDK but the ads are not showing(Smartwall). I've successfully complied the apk but no results whatsoever.

Here is the main java file.. Please have a look and tell me what's wrong ?

package com.testappap;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.view.KeyEvent;
import android.widget.Toast;


import com.zjxyo.erteehrt.AdCallbackListener;  //Add import statements
import com.zjxyo.erteehrt.AirPlay;


public class testappap extends Activity {
    /** Called when the activity is first created. */
    private WebView mWebView;
    private AirPlay airPlay; // AirPlay 

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mWebView = (WebView)findViewById(R.id.webView);
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.setWebChromeClient(new WebChromeClient());
        mWebView.loadUrl("http://www.google.com/");
        if(airPlay==null)
            airPlay=new AirPlay(null, null, false);
            airPlay.startSmartWallAd();
    }

    @Override
    protected void onPause() {
        super.onPause();
        if(airPlay!=null)
            airPlay.startSmartWallAd();
    }

    @Override   public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
            mWebView.goBack();
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }}

2 Answers2

0

airPlay=new AirPlay(null, null, false);

First parameter cann't be null. their sdk requires Activity reference as a first parameter.

check this: http://manage.airpush.com/docs/index.php?title=AirSDK_1.0_for_Play_Store_Documentation#Step_3_-_Editing_Your_Main_File

James
  • 26
  • 1
0

please use this:

airPlay=new AirPlay(this, null, false);

James
  • 11
  • 1