Benjamin-Loison / termux-api

Termux add-on app which exposes device functionality as API to command line programs.
https://f-droid.org/en/packages/com.termux.api/
0 stars 0 forks source link

Retrieve information about the notification's actions #13

Open Benjamin-Loison opened 9 months ago

Benjamin-Loison commented 9 months ago

termux-api/issues/110 comment

https://developer.android.com/reference/android/service/notification/StatusBarNotification https://developer.android.com/reference/android/app/Notification https://github.com/termux/termux-api/blob/4159c62dd6cd9a8793465def769686fc7ac99fe2/app/src/main/java/com/termux/api/apis/NotificationListAPI.java

termux-notification --help | grep -i action
Please read --help-actions for help with action arguments.
  --action action          action to execute when pressing the notification
  --button1-action action  action to execute on the first notification button
  --button2-action action  action to execute on the second notification button
  --button3-action action  action to execute on the third notification button
  --help-actions           show the help for actions
  --on-delete action       action to execute when the the notification is cleared
Media actions (available with --type "media"):
  --media-next             action to execute on the media-next button
  --media-pause            action to execute on the media-pause button
  --media-play             action to execute on the media-play button
  --media-previous         action to execute on the media-previous button
termux-notification --help-actions

Feature description

Reference implementation

Have you checked if the feature is accessible through the Android API? Do you know of other open-source apps that has a similar feature as the one you want? (Provide links)

Benjamin-Loison commented 9 months ago

Do the various Android actions can be generated with Termux? If not, then does the requester mean Android or Termux notification actions?

nozwock commented 9 months ago

I was referring to notifications in general. Not sure if there's an API to fetch useful info (such as intent) about a notification's actions.