public void PlayAudioAdvertisement(View v) { RedTroops.getInstance(this) .playAudioAd( new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { Toast.makeText(TestActivity.this, "Media stopped", Toast.LENGTH_SHORT).show(); } }); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); getFragmentManager() .beginTransaction() .replace(R.id.content_frame, new ScrollFragment()) .commit(); RedTroops.getInstance(this) .init( initFinishedListener, new AdType().videoAd().bannerAd().audioAd().nativeAd().interstitialAd()); }
@Override protected void onResume() { RedTroops.getInstance(TestActivity.this).showBanner(TestActivity.this); RedTroops.getInstance(this).onResume(); super.onResume(); }
@Override protected void onPause() { RedTroops.getInstance(this).onPause(); super.onPause(); }
public void ShowInterstitial(View v) { RedTroops.getInstance(this).showInterstitialAd(this); }