java.lang.Object |
↳ |
com.google.android.gms.fitness.request.DataDeleteRequest.Builder |
Class Overview
Builder used to create new DataDeleteRequests.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
DataDeleteRequest.Builder
()
Public Methods
Adds a specific data source to delete data from the Google Fit store. Apps can either
use this function or use addDataType(DataType)
to add a specific data type,
or use deleteAllData()
to mark data for all data types to be deleted.
Parameters |
dataSource |
DataSource
|
Throws |
IllegalArgumentException |
if the input data source is invalid or if all data is
already marked for deletion
|
Adds a specific data type to delete data from the Google Fit store. Apps can either
use this function or use addDataSource(DataSource)
to add a specific data
source, or use deleteAllData()
to mark data for all data types to be deleted.
Parameters |
dataType |
DataType
|
Throws |
IllegalArgumentException |
if invalid data type is specified or if all data is
already marked for deletion
|
Adds a specific session to delete from the Google Fit store. Apps can either use this
function or use deleteAllSessions()
to mark all sessions for deletion. Only
sessions that have already ended can be marked for deletion.
Parameters |
session |
Session
|
Throws |
IllegalArgumentException |
if the input session is invalid or is still ongoing,
or if all sessions are already marked for deletion
|
Finishes building and returns the request.
Throws |
IllegalStateException |
if time interval is not set or if input sessions are
outside the query time interval, or if no data or session is marked for deletion
|
Adds option to delete data for all data types. Apps can either use this function to
delete all data or specify a specific data source using
addDataSource(DataSource)
or a specific data type using
addDataType(DataType)
for data deletion.
Throws |
IllegalArgumentException |
if a specific data source/type is already added for
deletion
|
public
DataDeleteRequest.Builder
setTimeInterval
(long startTime, long endTime, TimeUnit timeUnit)
Sets the time interval for the data delete query.
Parameters |
startTime |
long
|
endTime |
long
|
timeUnit |
TimeUnit
|
Throws |
IllegalArgumentException |
if the input time interval is invalid.
|