Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void LoadOperation(iAdLoadResult resultListener, Activity activity)
- {
- try
- {
- activityRef = new WeakReference<>(activity);
- if (HandsMdmAds.getInstance().isInitialized())
- {
- interstitialAdObject = new SASInterstitialView(activity);
- HandsMdmAds.getInstance().targetAdToAudience((SASInterstitialView) interstitialAdObject,
- "INTERSTITIAL", "ROS", new SASAdView.AdResponseHandler()
- {
- @Override
- public void adLoadingCompleted(SASAdElement sasAdElement)
- {
- try
- {
- isReadyToShow = true;
- setResponseStatus(eAdsResponseStatus.succeed);
- onInterstitialAdLoaded();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- @Override
- public void adLoadingFailed(Exception e)
- {
- try
- {
- isReadyToShow = false;
- /*eAdsResponseStatus responseStatus = null;
- if (e == AdError.NO_FILL)
- {
- responseStatus = eAdsResponseStatus.no_fill;
- }
- else
- {
- responseStatus = eAdsResponseStatus.error;
- }
- setResponseStatus(responseStatus);*/
- responseStatus = eAdsResponseStatus.error;
- onInterstitialAdFailedToLoad();
- }
- catch (Exception e1)
- {
- e1.printStackTrace();
- }
- }
- });
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement