java.lang.Object | |
↳ | com.google.android.gms.fitness.request.DataDeleteRequest |
A request to delete data and sessions added by the app from the Google Fit store in the time interval specified.
An app can either specify a specific DataType
or a specific DataSource
or mark
data for all data types to be deleted. If neither a specific data type/source is specified nor
all data is marked for deletion, then no data will be deleted.
An app can also request to delete specific Sessions
or all sessions added
by this app. If neither a specific session is specified nor all sessions are marked for
deletion, then no session will be deleted.
Only sessions that have already ended can be specified. Ongoing sessions will not be deleted.
An app can only delete data and sessions that it has added and cannot delete data and sessions added by other apps.
Sample usage to delete data for a specific data type and session:
DataDeleteRequest request = new DataDeleteRequest.Builder() .setTimeInterval(startTime, endTime, timeUnit) .addDataType(dataType) .addSession(session) .build();Sample usage to delete data for all data types and a specific session:
DataDeleteRequest request = new DataDeleteRequest.Builder() .setTimeInterval(startTime, endTime, timeUnit) .deleteAllData() .addSession(session) .build();Sample usage to delete data for all data types and all sessions:
DataDeleteRequest request = new DataDeleteRequest.Builder() .setTimeInterval(startTime, endTime, timeUnit) .deleteAllData() .deleteAllSessions() .build();
Nested Classes | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataDeleteRequest.Builder | Builder used to create new DataDeleteRequests. |
[Expand]
Inherited Constants | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true if all data types are marked for deletion.
| |||||||||||
Returns true if all sessions are marked for deletion.
| |||||||||||
Returns the list of data sources specified for data deletion.
| |||||||||||
Returns the list of data types specified for data deletion.
| |||||||||||
Returns the end time of the query, in the given unit since epoch.
| |||||||||||
Returns the list of sessions specified for deletion.
| |||||||||||
Returns the start time of the query, in the given unit since epoch.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||
![]() |
Returns true if all data types are marked for deletion. Otherwise,
only the specified data types
and
data sources
will have their data deleted.
Returns true if all sessions are marked for deletion. Otherwise, only the specified
sessions
will be deleted.
Returns the list of data sources specified for data deletion.
Returns the list of data types specified for data deletion. All data sources for the given data type will be deleted.
Returns the end time of the query, in the given unit since epoch. A valid end time is always set.
Returns the list of sessions specified for deletion.
Returns the start time of the query, in the given unit since epoch. A valid start time is always set.