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())
- {
- interstitial = new SASInterstitialView(activity);
- //HandsMdmAds.getInstance().targetAdToAudience((SASInterstitialView) interstitialAdObject,
- HandsMdmAds.getInstance().targetAdToAudience(interstitial,
- "INTERSTITIAL", "ROS", new SASInterstitialView.AdResponseHandler()
- {
- @Override
- public void adLoadingCompleted(SASAdElement sasAdElement)
- {
- Log.d("myHands", "adLoadingCompleted: ");
- try
- {
- isReadyToShow = true;
- setResponseStatus(eAdsResponseStatus.succeed);
- onInterstitialAdLoaded();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- @Override
- public void adLoadingFailed(Exception e)
- {
- Log.d("myHands", "adLoadingFailed: " + _placment.name() + " " + e.getMessage());
- 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