API Reference

Notifications

Read active notifications. Requires NotificationListenerService to be enabled in settings.

Type Definitions

bash
type Notification {
  id: ID!
  onlyOnce: Boolean!       # "persistent" notification flag
  isClearable: Boolean!
  appId: String!           # package name
  appName: String!
  time: String!            # ISO 8601
  silent: Boolean!
  title: String!
  body: String!
  actions: [String!]!      # action button labels
  replyActions: [String!]! # labels of inline-reply actions
}

Operations

query

notifications

List all currently active notifications.

bash
query GetNotifications {
  notifications {
    id onlyOnce isClearable appId appName time silent title body
    actions replyActions
  }
}
mutation

cancelNotifications

Dismiss one or more notifications by ID.

bash
mutation CancelNotifications($ids: [ID!]!) {
  cancelNotifications(ids: $ids)
}
mutation

replyNotification

Send a reply to a notification via an inline-reply action. actionIndex is 0-based among reply-capable actions.

bash
mutation ReplyNotification($id: ID!, $actionIndex: Int!, $text: String!) {
  replyNotification(id: $id, actionIndex: $actionIndex, text: $text)
}