Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HashMap<String, Object> hashMap = new HashMap<String, Object>();
- //set adUnitID must
- hashMap.put(MobVistaConstans.PROPERTIES_UNIT_ID, "989");
- final MVInterstitialHandler mInterstitialHandler = new MVInterstitialHandler(this, hashMap);
- mInterstitialHandler.setInterstitialListener(new InterstitialListener() {
- @Override
- public void onInterstitialShowSuccess() {
- Log.e(TAG, "onInterstitialShowSuccess");
- }
- @Override
- public void onInterstitialShowFail(String errorMsg) {
- Log.e(TAG, "onInterstitialShowFail errorMsg:"+errorMsg);
- timeUpAds = false;
- doStartHome();
- }
- @Override
- public void onInterstitialLoadSuccess() {
- Log.e(TAG, "onInterstitialLoadSuccess");
- timeUpAds = false;
- mInterstitialHandler.show();
- }
- @Override
- public void onInterstitialLoadFail(String errorMsg) {
- Log.e(TAG, "onInterstitialLoadFail errorMsg:"+errorMsg);
- timeUpAds = false;
- doStartHome();
- }
- @Override
- public void onInterstitialClosed() {
- Log.e(TAG, "onInterstitialClosed");
- doStartHome();
- }
- @Override
- public void onInterstitialAdClick() {
- Log.e(TAG, "onInterstitialAdClick");
- timeUpAds = false;
- doStartHome();
- }
- });
- mInterstitialHandler.preload();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement