Class RequirementsWatcher


  • @Deprecated
    public final class RequirementsWatcher
    extends Object
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Watches whether the Requirements are met and notifies the RequirementsWatcher.Listener on changes.
    • Method Detail

      • start

        @RequirementFlags
        public @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int start()
        Deprecated.
        Starts watching for changes. Must be called from a thread that has an associated Looper. Listener methods are called on the caller thread.
        Returns:
        Initial RequirementFlags that are not met, or 0.
      • stop

        public void stop()
        Deprecated.
        Stops watching for changes.