我已经尝试阅读有关如何将其放入java类的教程,但似乎无法正确编码。我遇到很多问题,但是还不清楚在哪里放置所有内容。它给出了精确的行,但是会干扰我的编码。这是我的代码,如果你可以通过告诉我revmob代码应该去哪里帮助我,以及为什么我知道如何进一步参考它将帮助我很多。 `
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import org.apache.cordova.*;
import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.google.ads.AdView;
import android.app.Activity;
import com.revmob.ads.*;
import com.revmob.*;
import com.revmob.ads.fullscreen.*;
public class Manual extends DroidGap {
private static final String MY_AD_UNIT_ID = "a1524e277372095";
private AdView adView;
public static final int INVISIBLE = 4;
public static final int VISIBLE = 0;
private static String APPLICATION_ID = "52534b1f509659762d000008";
private RevMob revmob;
//onCreate
public void onCreate1(Bundle savedInstanceState){ super.onCreate(savedInstanceState);
// Starting RevMob session
revmob = RevMob.start(this, APPLICATION_ID); revmob.showFullscreenAd(this);
// .showFullscreenAd(this); shows up as undefined for the type RevMob
@Override
public void onCreate(Bundle savedInstanceState) {
// Loading your HTML as per PhoneGap tutorial
super.onCreate(savedInstanceState);
super.loadUrl("http://www.croruptdesigns.com/");
{
adView = new AdView(this, AdSize.BANNER, MY_AD_UNIT_ID);
adView.setMinimumHeight(75);
adView.setMinimumWidth(320);
LinearLayout layout = super.root;
layout.addView(adView);
layout.setHorizontalGravity(android.view.Gravity.CENTER_HORIZONTAL); //This centers the ads in landscape mode.
adView.loadAd(new AdRequest());
}
}
}`