public abstract class DriveEventService extends Service
implements ChangeListener CompletionListener
   ↳ android.content.Context
     ↳ android.content.ContextWrapper

Abstract base class for a bound service that handles Drive events. These events will be delivered using AIDL calls to the service. The base class handles binding and handling of these calls and will raise listener events on the subclass.

Subclasses should override one or more of the following interfaces depending upon the event types that expected by the application:

The default implementation of all listener methods (onListener) methods will log an unhandled event warning to indicate that an unexpected event type was received. Subclasses should override these methods for any expected event types to provide appropriate handling.

The implementation subclass must be listed as an exported service in the Android manifest for the application. The following manifest fragment shows a sample declaration with the required attributes:

 <manifest xmlns:android=""
   <service android:name=".MyAppEventService" android:exported="true" >
       <action android:name="" />

See Also

Constant Summary

String ACTION_HANDLE_EVENT The action name used to bind to the DriveEventService for event delivery

Inherited Constant Summary

Protected Constructor Summary

Public Method Summary

synchronized final IBinder
onBind(Intent intent)
synchronized void
onUnbind(Intent intent)

Protected Method Summary



public static final String ACTION_HANDLE_EVENT

The action name used to bind to the DriveEventService for event delivery

Constant Value: ""

Protected Constructors

protected DriveEventService (String name)

Creates a new event service instance.

name the name of the event service, used to name the worker thread (for debugging).

protected DriveEventService ()

Creates a new event service instance with a default name.

Public Methods

public final synchronized IBinder onBind (Intent intent)

public void onChange (ChangeEvent event)

public void onCompletion (CompletionEvent event)

public synchronized void onDestroy ()

public boolean onUnbind (Intent intent)

Protected Methods

protected int getCallingUid ()

Retrieves the current calling UID. Exposed to support test mocking