docs/doc/reference/com/google/android/exoplayer2/scheduler/Requirements.html
Package com.google.android.exoplayer2.scheduler
All Implemented Interfaces:Parcelable
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classRequirementsextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Parcelable](https://developer.android.com/reference/android/os/Parcelable.html "class or interface in android.os")
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.
Defines a set of device state requirements.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | Requirements.RequirementFlags |
Deprecated.
Requirement flags. |
-
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Parcelable.Creator<Requirements> | CREATOR |
Deprecated.
|
| static int | DEVICE_CHARGING |
Deprecated.
Requirement that the device is charging.
|
| static int | DEVICE_IDLE |
Deprecated.
Requirement that the device is idle.
|
| static int | DEVICE_STORAGE_NOT_LOW |
Deprecated.
Requirement that the device's internal storage is not low.
|
| static int | NETWORK |
Deprecated.
Requirement that the device has network connectivity.
|
| static int | NETWORK_UNMETERED |
Deprecated.
Requirement that the device has a network connection that is unmetered. |
-
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructors | Constructor | Description |
| --- | --- |
| Requirements(@com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int requirements) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | checkRequirements(Context context) |
Deprecated.
Returns whether the requirements are met.
|
| int | describeContents() |
Deprecated.
|
| boolean | equals(Object o) |
Deprecated.
|
| Requirements | filterRequirements(int requirementsFilter) |
Deprecated.
Filters the requirements, returning the subset that are enabled by the provided filter.
|
| @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int | getNotMetRequirements(Context context) |
Deprecated.
Returns requirements that are not met, or 0.
|
| @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int | getRequirements() |
Deprecated.
Returns the requirements.
|
| int | hashCode() |
Deprecated.
|
| boolean | isChargingRequired() |
Deprecated.
Returns whether the device is required to be charging.
|
| boolean | isIdleRequired() |
Deprecated.
Returns whether the device is required to be idle.
|
| boolean | isNetworkRequired() |
Deprecated.
Returns whether network connectivity is required.
|
| boolean | isStorageNotLowRequired() |
Deprecated.
Returns whether the device is required to not be low on internal storage.
|
| boolean | isUnmeteredNetworkRequired() |
Deprecated.
Returns whether un-metered network connectivity is required.
|
| void | writeToParcel(Parcel dest, int flags) |
Deprecated.
|
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public static final int NETWORK
Deprecated.
Requirement that the device has network connectivity. See Also:Constant Field Values
-
public static final int NETWORK_UNMETERED
Deprecated.
Requirement that the device has a network connection that is unmetered. See Also:Constant Field Values
-
public static final int DEVICE_IDLE
Deprecated.
Requirement that the device is idle. See Also:Constant Field Values
-
public static final int DEVICE_CHARGING
Deprecated.
Requirement that the device is charging. See Also:Constant Field Values
-
public static final int DEVICE_STORAGE_NOT_LOW
Deprecated.
Requirement that the device's internal storage is not low. Note that this requirement is not affected by the status of external storage. See Also:Constant Field Values
-
public static final[Parcelable.Creator](https://developer.android.com/reference/android/os/Parcelable.Creator.html "class or interface in android.os")<[Requirements](Requirements.html "class in com.google.android.exoplayer2.scheduler")> CREATOR
Deprecated.
-
public Requirements([@RequirementFlags](Requirements.RequirementFlags.html "annotation in com.google.android.exoplayer2.scheduler")@com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int requirements)
Deprecated.
Parameters:requirements - A combination of requirement flags.
-
[@RequirementFlags](Requirements.RequirementFlags.html "annotation in com.google.android.exoplayer2.scheduler")public @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int getRequirements()
Deprecated.
Returns the requirements.
-
public[Requirements](Requirements.html "class in com.google.android.exoplayer2.scheduler")filterRequirements(int requirementsFilter)
Deprecated.
Filters the requirements, returning the subset that are enabled by the provided filter.
Parameters:requirementsFilter - The enabled Requirements.RequirementFlags.Returns:The filtered requirements. If the filter does not cause a change in the requirements then this instance will be returned.
-
public boolean isNetworkRequired()
Deprecated.
Returns whether network connectivity is required.
-
public boolean isUnmeteredNetworkRequired()
Deprecated.
Returns whether un-metered network connectivity is required.
-
public boolean isChargingRequired()
Deprecated.
Returns whether the device is required to be charging.
-
public boolean isIdleRequired()
Deprecated.
Returns whether the device is required to be idle.
-
public boolean isStorageNotLowRequired()
Deprecated.
Returns whether the device is required to not be low on internal storage.
-
public boolean checkRequirements([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context)
Deprecated.
Returns whether the requirements are met.
Parameters:context - Any context.Returns:Whether the requirements are met.
-
[@RequirementFlags](Requirements.RequirementFlags.html "annotation in com.google.android.exoplayer2.scheduler")public @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int getNotMetRequirements([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context)
Deprecated.
Returns requirements that are not met, or 0.
Parameters:context - Any context.Returns:The requirements that are not met, or 0.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")o)
Deprecated.
Overrides:equals in class Object
-
public int hashCode()
Deprecated.
Overrides:hashCode in class Object
-
public int describeContents()
Deprecated.
Specified by:describeContents in interface Parcelable
-
public void writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html "class or interface in android.os")dest,
int flags)
Deprecated.
Specified by:writeToParcel in interface Parcelable