docs/doc/reference/com/google/android/exoplayer2/scheduler/RequirementsWatcher.html
Package com.google.android.exoplayer2.scheduler
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classRequirementsWatcherextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | RequirementsWatcher.Listener |
Deprecated.
Notified when RequirementsWatcher instance first created and on changes whether the Requirements are met.
|
Constructors | Constructor | Description |
| --- | --- |
| RequirementsWatcher(Context context, RequirementsWatcher.Listener listener, Requirements requirements) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Requirements | getRequirements() |
Deprecated.
Returns watched Requirements.
|
| @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int | start() |
Deprecated.
Starts watching for changes.
|
| void | stop() |
Deprecated.
Stops watching for changes. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public RequirementsWatcher([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[RequirementsWatcher.Listener](RequirementsWatcher.Listener.html "interface in com.google.android.exoplayer2.scheduler")listener,[Requirements](Requirements.html "class in com.google.android.exoplayer2.scheduler")requirements)
Deprecated.
Parameters:context - Any context.listener - Notified whether the Requirements are met.requirements - The requirements to watch.
-
[@RequirementFlags](Requirements.RequirementFlags.html "annotation in com.google.android.exoplayer2.scheduler")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.
-
public void stop()
Deprecated.
Stops watching for changes.
-
public[Requirements](Requirements.html "class in com.google.android.exoplayer2.scheduler")getRequirements()
Deprecated.
Returns watched Requirements.