Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux-notification: Get current notifications #110

Closed
tajnymag opened this issue Sep 29, 2017 · 9 comments · Fixed by termux/termux-api-package#74
Closed

termux-notification: Get current notifications #110

tajnymag opened this issue Sep 29, 2017 · 9 comments · Fixed by termux/termux-api-package#74

Comments

@tajnymag
Copy link

tajnymag commented Sep 29, 2017

Would it be possible to query for currently displayed notifications?

It could work as follows:

termux-notification-get --json

Result:

{
{"appid":"com.facebook.mlite","title":"John Doe","content":"Some content of the notification"},
{"appid":"com.maxmpz.audioplayer","title":"After the Storm","content":"Name of a song fex."}
}
@vovcacik
Copy link

Meanwhile one can grab some data from dumpsys notification (root shell required).

@tajnymag
Copy link
Author

Interesting, but that doesn't contain whole content of the notifications. Try grepping the output of "dumpsys notification" with content from Termux's permanent or Messenger's multi-line notification.

However, it's better than nothing. Thank you.

@T-vK
Copy link

T-vK commented Apr 25, 2019

Any news on this? I see there has been a related PR?

@SwapnilSoni1999
Copy link

It says command not found for termux-notification-get

@ghost ghost deleted a comment from Kilo-411 Jul 28, 2019
@xalexalex
Copy link
Collaborator

xalexalex commented Aug 4, 2019

@T-vK @SwapnilSoni1999
The functionality is available in termux/termux-api thanks to #210 , but someone must implement it in termux/termux-api-package. Meanwhile from within termux you can use /data/data/com.termux/files/usr/libexec/termux-api NotificationList after granting Termux:API notification access (in android Pie: settings -> apps & notifications -> special app access -> notification access).

@SwapnilSoni1999
Copy link

@xalexalex thanks alot ❤️

@fornwall
Copy link
Member

fornwall commented Aug 7, 2019

Fixed in version 0.44 of the termux-api package!

@Benjamin-Loison
Copy link

Just to let the issue readers know: the command is termux-notification-list.

@nozwock
Copy link

nozwock commented Feb 18, 2024

Is there a way to retrieve information about the notification's actions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants