Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public abstract class

NotificationCompatSideChannelService

extends Service
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.support.v4.app.NotificationCompatSideChannelService

Class Overview

Abstract service to receive side channel notifications sent from NotificationManagerCompat .

To receive side channel notifications, extend this service and register it in your android manifest with an intent filter for the BIND_NOTIFICATION_SIDE_CHANNEL action. Note: you must also have an enabled NotificationListenerService within your package.

Example AndroidManifest.xml addition:

        <service android:name="com.example.NotificationSideChannelService">
     <intent-filter>
         <action android:name="android.support.BIND_NOTIFICATION_SIDE_CHANNEL" />
     </intent-filter>
 </service>
       

Summary

[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Public Constructors
NotificationCompatSideChannelService ()
Public Methods
abstract void cancel ( String packageName, int id, String tag)
Handle a side-channelled notification being cancelled.
abstract void cancelAll ( String packageName)
Handle the side-channelled cancelling of all notifications for a package.
abstract void notify ( String packageName, int id, String tag, Notification notification)
Handle a side-channeled notification being posted.
IBinder onBind ( Intent intent)
Return the communication channel to the service.
[Expand]
Inherited Methods
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2

Public Constructors

public NotificationCompatSideChannelService ()

Public Methods

public abstract void cancel ( String packageName, int id, String tag)

Handle a side-channelled notification being cancelled.

public abstract void cancelAll ( String packageName)

Handle the side-channelled cancelling of all notifications for a package.

public abstract void notify ( String packageName, int id, String tag, Notification notification)

Handle a side-channeled notification being posted.

public IBinder onBind ( Intent intent)

Return the communication channel to the service. May return null if clients can not bind to the service. The returned IBinder is usually for a complex interface that has been described using aidl .

Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process . More information about the main thread can be found in Processes and Threads .

Parameters
intent The Intent that was used to bind to this service, as given to Context.bindService . Note that any extras that were included with the Intent at that point will not be seen here.
Returns
  • Return an IBinder through which clients can call on to the service.