Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. HashMap<String, Object> hashMap = new HashMap<String, Object>();
  2. //set adUnitID must
  3. hashMap.put(MobVistaConstans.PROPERTIES_UNIT_ID, "989");
  4.  
  5. final MVInterstitialHandler mInterstitialHandler = new MVInterstitialHandler(this, hashMap);
  6. mInterstitialHandler.setInterstitialListener(new InterstitialListener() {
  7.  
  8. @Override
  9. public void onInterstitialShowSuccess() {
  10. Log.e(TAG, "onInterstitialShowSuccess");
  11. }
  12.  
  13. @Override
  14. public void onInterstitialShowFail(String errorMsg) {
  15. Log.e(TAG, "onInterstitialShowFail errorMsg:"+errorMsg);
  16. timeUpAds = false;
  17. doStartHome();
  18. }
  19.  
  20. @Override
  21. public void onInterstitialLoadSuccess() {
  22. Log.e(TAG, "onInterstitialLoadSuccess");
  23. timeUpAds = false;
  24. mInterstitialHandler.show();
  25. }
  26.  
  27. @Override
  28. public void onInterstitialLoadFail(String errorMsg) {
  29. Log.e(TAG, "onInterstitialLoadFail errorMsg:"+errorMsg);
  30. timeUpAds = false;
  31. doStartHome();
  32. }
  33.  
  34. @Override
  35. public void onInterstitialClosed() {
  36. Log.e(TAG, "onInterstitialClosed");
  37. doStartHome();
  38. }
  39.  
  40. @Override
  41. public void onInterstitialAdClick() {
  42. Log.e(TAG, "onInterstitialAdClick");
  43. timeUpAds = false;
  44. doStartHome();
  45. }
  46. });
  47.  
  48. mInterstitialHandler.preload();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement