ChangeEvent
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
DriveId
|
getDriveId
() Returns the id of the Drive resource that triggered the event.
|
boolean |
|
boolean |
|
boolean |
|
String
|
|
void |
|
Inherited Method Summary
From class java.lang.Object
From interface android.os.Parcelable
abstract int |
describeContents
()
|
abstract void |
writeToParcel
( Parcel
arg0,
int arg1)
|
Public Methods
public DriveId
getDriveId
()
Returns the id of the Drive resource that triggered the event.
public boolean
hasBeenDeleted
()
Returns true
if the resource has been deleted.
public boolean
hasContentChanged
()
Returns true
if the content has changed for this resource.
Returns true
if the metadata has changed for this resource.
public void
writeToParcel
( Parcel
dest, int
flags)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eChangeEvent\u003c/code\u003e indicates changes to a Drive resource's content or metadata, such as Google Docs, Sheets, or Slides.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to check for specific changes, like content updates, metadata modifications, or if the resource was deleted.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eChangeEvent\u003c/code\u003e with an event listener to be notified when a change happens to a Drive resource they are monitoring.\u003c/p\u003e\n"],["\u003cp\u003eIt includes the \u003ccode\u003eDriveId\u003c/code\u003e of the changed resource for easy identification and access.\u003c/p\u003e\n"]]],[],null,["# ChangeEvent\n\npublic final class **ChangeEvent** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) [ResourceEvent](/android/reference/com/google/android/gms/drive/events/ResourceEvent) \nSent when a [DriveResource](/android/reference/com/google/android/gms/drive/DriveResource)\nhas had a change to its [DriveContents](/android/reference/com/google/android/gms/drive/DriveContents)\nor [Metadata](/android/reference/com/google/android/gms/drive/Metadata). Refer to\n[DriveEvent](/android/reference/com/google/android/gms/drive/events/DriveEvent)\nfor additional information about event listeners.\n\nRefer to [DriveEvent](/android/reference/com/google/android/gms/drive/events/DriveEvent)\nfor general information about event listeners and [addChangeListener(DriveResource, OnChangeListener)](/android/reference/com/google/android/gms/drive/DriveResourceClient#addChangeListener(com.google.android.gms.drive.DriveResource, com.google.android.gms.drive.events.OnChangeListener)) for how to create them. \n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Field Summary\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|---|\n| public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[ChangeEvent](/android/reference/com/google/android/gms/drive/events/ChangeEvent)\\\u003e | [CREATOR](/android/reference/com/google/android/gms/drive/events/ChangeEvent#CREATOR) | |\n\n### Public Method Summary\n\n|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DriveId](/android/reference/com/google/android/gms/drive/DriveId) | [getDriveId](/android/reference/com/google/android/gms/drive/events/ChangeEvent#getDriveId())() Returns the id of the Drive resource that triggered the event. |\n| boolean | [hasBeenDeleted](/android/reference/com/google/android/gms/drive/events/ChangeEvent#hasBeenDeleted())() Returns `true` if the resource has been deleted. |\n| boolean | [hasContentChanged](/android/reference/com/google/android/gms/drive/events/ChangeEvent#hasContentChanged())() Returns `true` if the content has changed for this resource. |\n| boolean | [hasMetadataChanged](/android/reference/com/google/android/gms/drive/events/ChangeEvent#hasMetadataChanged())() Returns `true` if the metadata has changed for this resource. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/android/gms/drive/events/ChangeEvent#toString())() |\n| void | [writeToParcel](/android/reference/com/google/android/gms/drive/events/ChangeEvent#writeToParcel(android.os.Parcel, int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags) |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nFrom interface [com.google.android.gms.drive.events.ResourceEvent](/android/reference/com/google/android/gms/drive/events/ResourceEvent) \n\n|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [DriveId](/android/reference/com/google/android/gms/drive/DriveId) | [getDriveId](/android/reference/com/google/android/gms/drive/events/ResourceEvent#getDriveId())() Returns the id of the Drive resource that triggered the event. |\n\nFields\n------\n\n#### public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[ChangeEvent](/android/reference/com/google/android/gms/drive/events/ChangeEvent)\\\u003e\n**CREATOR**\n\nPublic Methods\n--------------\n\n#### public [DriveId](/android/reference/com/google/android/gms/drive/DriveId)\n**getDriveId** ()\n\nReturns the id of the Drive resource that triggered the event. \n\n#### public boolean **hasBeenDeleted** ()\n\nReturns `true` if the resource has been deleted. \n\n#### public boolean **hasContentChanged** ()\n\nReturns `true` if the content has changed for this resource. \n\n#### public boolean **hasMetadataChanged** ()\n\nReturns `true` if the metadata has changed for this resource. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()\n\n#### public void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags)"]]