NotificationCompatSideChannelService

abstract class NotificationCompatSideChannelService : Service
kotlin.Any
   ↳ android.content.Context
   ↳ android.content.ContextWrapper
   ↳ android.app.Service
   ↳ androidx.core.app.NotificationCompatSideChannelService

Abstract service to receive side channel notifications sent from androidx.core.app.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 android.service.notification.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

Public constructors

Abstract service to receive side channel notifications sent from androidx.core.app.NotificationManagerCompat.

Public methods

abstract Unit
cancel(packageName: String!, id: Int, tag: String!)

Handle a side-channelled notification being cancelled.

abstract Unit
cancelAll(packageName: String!)

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

abstract Unit
notify(packageName: String!, id: Int, tag: String!, notification: Notification!)

Handle a side-channeled notification being posted.

open IBinder!
onBind(intent: Intent!)

Public constructors

<init>

NotificationCompatSideChannelService()

Abstract service to receive side channel notifications sent from androidx.core.app.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 android.service.notification.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>

Public methods

cancel

abstract fun cancel(packageName: String!, id: Int, tag: String!): Unit

Handle a side-channelled notification being cancelled.

cancelAll

abstract fun cancelAll(packageName: String!): Unit

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

notify

abstract fun notify(packageName: String!, id: Int, tag: String!, notification: Notification!): Unit

Handle a side-channeled notification being posted.

onBind

open fun onBind(intent: Intent!): IBinder!