Class InterstitialVideo

  • All Implemented Interfaces:
    android.content.DialogInterface, android.view.KeyEvent.Callback, android.view.View.OnCreateContextMenuListener, android.view.Window.Callback

    public class InterstitialVideo
    extends AdBaseDialog
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface android.content.DialogInterface

        android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected long getDuration​(android.view.View view)  
      protected int getSkipDelayMs()  
      protected void handleCloseClick()
      Is executed when the close button is clicked.
      protected void handleDialogShow()  
      protected void init()  
      boolean isVideoPaused()  
      void onDetachedFromWindow()  
      void pauseVideo()  
      void queueUIThreadTask​(java.lang.Runnable task)
      Queue new task that should be performed in UI thread.
      void removeViews()
      Remove all views
      void resumeVideo()  
      void scheduleShowButtonTask()  
      void scheduleShowCloseBtnTask​(android.view.View adView)  
      void scheduleShowCloseBtnTask​(android.view.View adView, int closeDelayInMs)  
      protected void scheduleTimer​(long delayInMs)  
      void setHasEndCard​(boolean hasEndCard)  
      protected void setRemainingTimeInMs​(int value)  
      void setShowButtonOnComplete​(boolean isEnabled)  
      boolean shouldShowCloseButtonOnComplete()  
      protected void showDurationTimer​(long durationInMillis)  
      protected void startTimer​(long durationInMillis)  
      • Methods inherited from class android.app.Dialog

        addContentView, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, requireViewById, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setTitle, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenu
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface android.view.Window.Callback

        onPointerCaptureChanged, onProvideKeyboardShortcuts
    • Constructor Detail

      • InterstitialVideo

        public InterstitialVideo​(android.content.Context context,
                                 android.widget.FrameLayout adView,
                                 InterstitialManager interstitialManager,
                                 AdUnitConfiguration adConfiguration)
    • Method Detail

      • onDetachedFromWindow

        public void onDetachedFromWindow()
        Specified by:
        onDetachedFromWindow in interface android.view.Window.Callback
        Overrides:
        onDetachedFromWindow in class android.app.Dialog
      • handleCloseClick

        protected void handleCloseClick()
        Description copied from class: AdBaseDialog
        Is executed when the close button is clicked. It is child job to handle the click
        Specified by:
        handleCloseClick in class AdBaseDialog
      • shouldShowCloseButtonOnComplete

        public boolean shouldShowCloseButtonOnComplete()
      • setShowButtonOnComplete

        public void setShowButtonOnComplete​(boolean isEnabled)
      • setHasEndCard

        public void setHasEndCard​(boolean hasEndCard)
      • isVideoPaused

        public boolean isVideoPaused()
      • scheduleShowCloseBtnTask

        public void scheduleShowCloseBtnTask​(android.view.View adView)
      • scheduleShowButtonTask

        public void scheduleShowButtonTask()
      • scheduleShowCloseBtnTask

        public void scheduleShowCloseBtnTask​(android.view.View adView,
                                             int closeDelayInMs)
      • pauseVideo

        public void pauseVideo()
      • resumeVideo

        public void resumeVideo()
      • removeViews

        public void removeViews()
        Remove all views
      • queueUIThreadTask

        public void queueUIThreadTask​(java.lang.Runnable task)
        Queue new task that should be performed in UI thread.
        Parameters:
        task - that will perform in UI thread
      • close

        public void close()
      • getDuration

        protected long getDuration​(android.view.View view)
      • scheduleTimer

        protected void scheduleTimer​(long delayInMs)
      • startTimer

        protected void startTimer​(long durationInMillis)
      • showDurationTimer

        protected void showDurationTimer​(long durationInMillis)
        Parameters:
        durationInMillis - - duration to count down
      • setRemainingTimeInMs

        protected void setRemainingTimeInMs​(int value)
      • getSkipDelayMs

        protected int getSkipDelayMs()