|
| 1 | +package jp.co.voyagegroup.fluct.sample; |
| 2 | + |
| 3 | +import jp.co.voyagegroup.android.fluct.jar.FluctInterstitial; |
| 4 | +import android.app.Activity; |
| 5 | +import android.os.Bundle; |
| 6 | +import android.view.Menu; |
| 7 | +import android.view.View; |
| 8 | +import android.view.View.OnClickListener; |
| 9 | +import android.widget.Button; |
| 10 | + |
| 11 | +public class FluctSample extends Activity { |
| 12 | + |
| 13 | + private FluctInterstitial mFluctInterstitial; |
| 14 | + private final FluctInterstitialCallback mInterstitialCallback = new FluctInterstitialCallback(); |
| 15 | + |
| 16 | + @Override |
| 17 | + public void onCreate(Bundle savedInstanceState) { |
| 18 | + super.onCreate(savedInstanceState); |
| 19 | + setContentView(R.layout.activity_fluct_sample); |
| 20 | + mFluctInterstitial = new FluctInterstitial(getApplicationContext()); |
| 21 | + mFluctInterstitial.setFluctInterstitialCallback(mInterstitialCallback); |
| 22 | + Button showIntersitial = (Button)findViewById(R.id.showIntersitial); |
| 23 | + showIntersitial.setOnClickListener(new OnClickListener(){ |
| 24 | + @Override |
| 25 | + public void onClick(View view) { |
| 26 | + mFluctInterstitial.showIntersitialAd(); |
| 27 | + } |
| 28 | + }); |
| 29 | + } |
| 30 | + |
| 31 | + @Override |
| 32 | + public boolean onCreateOptionsMenu(Menu menu) { |
| 33 | + getMenuInflater().inflate(R.menu.activity_fluct_sample, menu); |
| 34 | + return true; |
| 35 | + } |
| 36 | + |
| 37 | + private final class FluctInterstitialCallback implements jp.co.voyagegroup.android.fluct.jar.FluctInterstitial.FluctInterstitialCallback { |
| 38 | + public void onReceiveAdInfo(int status) { |
| 39 | + } |
| 40 | + } |
| 41 | +} |
0 commit comments