public interface

DriveEvent

implements Parcelable
com.google.android.gms.drive.events.DriveEvent
Known Indirect Subclasses

Class Overview

Base interface implemented by all Drive event types. An application can express interest in receiving events by adding an event listener or subscription.

An event listener implements the DriveEvent.Listener interface for a particular event type and receives a direct callback from the Drive service to a client application that is currently connected. A listener is added by calling the appropriate addListener method on the DriveResource of interest or on DriveApi for listeners that are not resource-specific. Listeners are active for the duration of the current connection or until the removeListener method is called on the same entity with the same callback parameter.

An event subscription is used to indicate that an application is interested in receiving events via intents, even if the application is not currently connected or even running. A subscription is added by calling the appropriate addSubscription method on the DriveResource of interest or on DriveApi for subscriptions that are not resource-specific, passing the class name of an exported DriveEventService subclass that will process the event intents delivered as a result of the subscription. Subscriptions are active until the removeSubscription method is called on the same entity with the same service class or until the next device reboot. An application that is interested in maintaining any subscriptions across reboots should handle the ACTION_BOOT_COMPLETED intent to add back these subscriptions after the reboot has completed.

A client can have both listeners and subscriptions active for a given resource at the same time. When an event is raised, the Drive service will have a preference for delivering events to listeners over subscriptions. If an event is delivered to successfully to one or more listeners for a connected client, then the event will not be delivered to any active subscriptions for the same client application. An event can be delivered to multiple listeners or multiple subscribers for a given application but never to both.

Summary

Nested Classes
interface DriveEvent.Listener<E extends DriveEvent> Listens for Drive events of a particular type. 
Constants
int TYPE_CHANGE Event type that indicates a resource change.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
abstract DriveId getDriveId()
Returns the id of the Drive resource that triggered the event, or null if not resource-specific.
abstract int getType()
Returns the type of an event.
[Expand]
Inherited Methods
From interface android.os.Parcelable

Constants

public static final int TYPE_CHANGE

Event type that indicates a resource change.

See Also
Constant Value: 1 (0x00000001)

Public Methods

public abstract DriveId getDriveId ()

Returns the id of the Drive resource that triggered the event, or null if not resource-specific.

public abstract int getType ()

Returns the type of an event. See the TYPE_* constants for possible values.