A request object that specifies what data to receive from the Sleep API. Defaults to
SEGMENT_AND_CLASSIFY_EVENTS
.
Constant Summary
int | CLASSIFY_EVENTS_ONLY | RequestsSleepClassifyEvent
only. |
int | SEGMENT_AND_CLASSIFY_EVENTS | Requests both theSleepSegmentEvent
and theSleepClassifyEvent . |
int | SEGMENT_EVENTS_ONLY | RequestsSleepSegmentEvent
only. |
Inherited Constant Summary
Field Summary
public static finalCreator<SleepSegmentRequest> | CREATOR |
Public Constructor Summary
SleepSegmentRequest(int requestedDataType)
Constructs a
SleepSegmentRequest
indicating what type of data is being requested.
|
Public Method Summary
boolean | |
staticSleepSegmentRequest |
getDefaultSleepSegmentRequest()
Creates a default request that registers for both
SleepSegmentEvent andSleepClassifyEvent data.
|
int |
getRequestedDataType()
Returns the requested data type, which is one of
SEGMENT_AND_CLASSIFY_EVENTS ,
SEGMENT_EVENTS_ONLY ,or
CLASSIFY_EVENTS_ONLY .
|
int |
hashCode()
|
void |
writeToParcel(Parcelparcel, int
flags)
|
Inherited Method Summary
Constants
public static final int CLASSIFY_EVENTS_ONLY
RequestsSleepClassifyEvent
only.
public static final int SEGMENT_AND_CLASSIFY_EVENTS
Requests both theSleepSegmentEvent
and the
SleepClassifyEvent
.
public static final int SEGMENT_EVENTS_ONLY
RequestsSleepSegmentEvent
only.
Fields
public static finalCreator<SleepSegmentRequest> CREATOR
Public Constructors
publicSleepSegmentRequest(int requestedDataType)
Constructs aSleepSegmentRequest
indicating what type of data is being requested.
Parameters
requestedDataType | The type of data to receive pending intents for; valid values are
SEGMENT_AND_CLASSIFY_EVENTS ,
SEGMENT_EVENTS_ONLY ,and
CLASSIFY_EVENTS_ONLY . |
---|
Public Methods
public booleanequals(Objecto)
public staticSleepSegmentRequest getDefaultSleepSegmentRequest()
Creates a default request that registers for bothSleepSegmentEvent
and
SleepClassifyEvent
data.
public intgetRequestedDataType()
Returns the requested data type, which is one of
SEGMENT_AND_CLASSIFY_EVENTS
,
SEGMENT_EVENTS_ONLY
,or
CLASSIFY_EVENTS_ONLY
.