Sample Code

public class InterstitialActivity extends Activity implements LVDOInterstitialListener { private static final String TAG = "InterstitialActivity"; private String mApiKey; private LVDOInterstitialAd mInterstitialAd; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_interstitial); if (getSupportActionBar() != null) { getSupportActionBar().setTitle(getIntent().getStringExtra("title")); getSupportActionBar().setDisplayHomeAsUpEnabled(true); } String mCategory = getIntent().getStringExtra("CATEGORY"); mApiKey = getIntent().getStringExtra(AppConstant.EXTRA_API_KEY); if (mApiKey == null || mApiKey.trim().length() == 0) { mApiKey = ApiKey.getApiKeyCommon(this); } Log.v(TAG, "Api Key..." + mApiKey); loadInterstitial(); final List channelArrayList = new ArrayList<>(); final NewsFeedAdapter adapter = new NewsFeedAdapter(InterstitialActivity.this, channelArrayList); ListView newsView = (ListView) findViewById(R.id.events_list); if (newsView != null) { newsView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { Intent intent = new Intent(InterstitialActivity.this, WebViewActivity.class); intent.putExtra("uri", channelArrayList.get(position).getLink()); startActivity(intent); } }); newsView.setAdapter(adapter); } final HandleXML obj = new HandleXML(this); obj.setDataListener(new HandleXML.DataListener() { @Override public void onDataSuccess(final boolean isSuccess) { runOnUiThread(new Runnable() { @Override public void run() { if (isSuccess) { channelArrayList.addAll(obj.getChannelArrayList()); adapter.notifyDataSetChanged(); } else { Log.d(TAG, "Check internet connection"); } } }); } }); obj.fetchXML(Utils.RSS_FEED_URL); } @Override public void onBackPressed() { super.onBackPressed(); Intent intent = new Intent(getApplicationContext(), AdListActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; case R.id.item_setting: displayReplyActivity(); return true; default: Log.e("default item selected", "item"); } return super.onOptionsItemSelected(item); } private void displayReplyActivity() { Intent intentReplyActivity = new Intent(InterstitialActivity.this, SettingActivity.class); startActivity(intentReplyActivity); } private void loadInterstitial() { mInterstitialAd = new LVDOInterstitialAd(this, mApiKey, this); LVDOAdRequest adRequest = new LVDOAdRequest(); LocationData locationData = new LocationData(this); adRequest.setLocation(locationData.getDeviceLocation()); // It is recommended that you update the below parameter - accurate info is required adRequest.setAppStoreUrl(""); adRequest.setRequester(""); adRequest.setAppDomain(""); adRequest.setAppName(""); adRequest.setCategory(""); adRequest.setPublisherDomain(""); // Passing on the following parameter values can result in better targeting and higher yield // For parameters you cannot populate, please comment them out adRequest.setDmaCode("807"); adRequest.setEthnicity("Asian"); adRequest.setPostalCode("94538"); adRequest.setCurrPostal("94539"); adRequest.setDmaCode("807"); adRequest.setAge("27"); adRequest.setMaritalStatus("single"); adRequest.setGender("m"); adRequest.setBirthday("yyyy-mm-dd"); // Loading the ad mInterstitialAd.loadAd(adRequest); } @Override public void onInterstitialLoaded(LVDOInterstitialAd interstitialAd) { Log.d(TAG, "Interstitial Loaded"); mInterstitialAd.show(); } @Override public void onInterstitialFailed(LVDOInterstitialAd interstitialAd, LVDOConstants.LVDOErrorCode errorCode) { Log.v(TAG, "Interstitial Failed" + errorCode.toString()); } @Override public void onInterstitialShown(LVDOInterstitialAd interstitialAd) { Log.d(TAG, "Interstitial Shown"); } @Override public void onInterstitialClicked(LVDOInterstitialAd interstitialAd) { Log.d(TAG, "Interstitial Clicked"); } @Override public void onInterstitialDismissed(LVDOInterstitialAd interstitialAdl) { Log.d(TAG, "Interstitial Dismissed"); } @Override protected void onDestroy() { if (mInterstitialAd != null) { mInterstitialAd.destroyView(); } super.onDestroy(); } @Override protected void onPause() { if (mInterstitialAd != null) { mInterstitialAd.pause(); } super.onPause(); } @Override protected void onResume() { if (mInterstitialAd != null) { mInterstitialAd.resume(); } super.onResume(); } }

See InterstitialActivity.java from Chocolate SSP Demo app for a full example.