public class TmdUploadMetadata
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<TmdUploadMetadata> |
CREATOR |
Constructor and Description |
---|
TmdUploadMetadata()
Default constructor when nothing was set
|
TmdUploadMetadata(long uploadTimestamp,
int nbTmdActivities,
long lastTmdActivityTimestamp,
int nbLocations,
long lastLocationTimestamp)
Default constructor
|
TmdUploadMetadata(android.os.Parcel in)
Parcel constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
dataWasUploaded()
Check if some data (TMD or Location) was uploaded
|
int |
describeContents() |
static Result<TmdUploadMetadata> |
extractResult(android.content.Intent intent)
Extract the result embedded in the intent
|
long |
getLastTimestampOfLocationUploaded()
Get the timestamp of the last location point that was just uploaded
|
long |
getLastTimestampOfTmdActivityUploaded()
Get the end timestamp of last activity that was just uploaded
|
int |
getNbLocationsUploaded()
Get the number of location data points that were uploaded
|
int |
getNbTmdActivitiesUploaded()
Get the number of tmd activities that were just uploaded
|
long |
getUploadTimestamp()
Get the upload timestamp of the last upload
|
static boolean |
hasResult(android.content.Intent intent)
Check from an intent if it includes TMD_UPLOAD_METADATA
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<TmdUploadMetadata> CREATOR
public TmdUploadMetadata(long uploadTimestamp, int nbTmdActivities, long lastTmdActivityTimestamp, int nbLocations, long lastLocationTimestamp)
uploadTimestamp
- The upload timestamp of the last uploadnbTmdActivities
- The number of tmd activities that were just uploadedlastTmdActivityTimestamp
- The end timestamp of last activity that was just uploadednbLocations
- The number of location data points that were uploadedlastLocationTimestamp
- The timestamp of the last location point that was just uploadedpublic TmdUploadMetadata()
public TmdUploadMetadata(android.os.Parcel in)
in
- the parcelpublic long getUploadTimestamp()
System.currentTimeMillis()
)public int getNbTmdActivitiesUploaded()
public long getLastTimestampOfTmdActivityUploaded()
public int getNbLocationsUploaded()
public long getLastTimestampOfLocationUploaded()
public boolean dataWasUploaded()
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
@NonNull public java.lang.String toString()
toString
in class java.lang.Object
public static boolean hasResult(android.content.Intent intent)
intent
- the intent to checkpublic static Result<TmdUploadMetadata> extractResult(android.content.Intent intent)
intent
- the intent