API குறிப்பு
Notifications
செயலில் உள்ள அறிவிப்புகளைப் படிக்கவும். settings-இல் NotificationListenerService இயக்கப்பட்டிருக்க வேண்டும்.
வகை வரையறைகள்
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
}செயல்பாடுகள்
query
notifications
தற்போது செயலில் உள்ள அனைத்து அறிவிப்புகளையும் பட்டியலிடவும்.
bash
query GetNotifications {
notifications {
id onlyOnce isClearable appId appName time silent title body
actions replyActions
}
}mutation
cancelNotifications
ID மூலம் ஒன்று அல்லது அதற்கு மேற்பட்ட அறிவிப்புகளை நிராகரிக்கவும்.
bash
mutation CancelNotifications($ids: [ID!]!) {
cancelNotifications(ids: $ids)
}mutation
replyNotification
ஒரு inline-reply செயல் மூலம் ஒரு அறிவிப்புக்கு பதில் அனுப்பவும். reply-capable செயல்களில் actionIndex 0-அடிப்படையிலானது.
bash
mutation ReplyNotification($id: ID!, $actionIndex: Int!, $text: String!) {
replyNotification(id: $id, actionIndex: $actionIndex, text: $text)
}