API Referansı

Bildirimler

Aktif bildirimleri okuyun. NotificationListenerService'in ayarlarda etkinleştirilmiş olması gerekir.

Tip Tanımları

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
}

İşlemler

query

notifications

Şu anda aktif olan tüm bildirimleri listeleyin.

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

cancelNotifications

ID'ye göre bir veya daha fazla bildirimi kapatın.

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

replyNotification

Bir bildirimi satır içi yanıt eylemi yoluyla yanıtlayın. actionIndex, yanıt verebilen eylemler arasında 0 tabanlıdır.

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