Description
Problem description
Termux:API notifications are in separate 'Termux API notification channel' from the App Termux:API. The app is not listed in the Android app notification settings. Only Termux is being listed, Termux:API is not but notifications appear from Termux:API. Trying to find Termux:API notification settings, they can only be found via Settings > Apps > Termux:API > Notifications > ...
Without Termux:API as a separate app in notification settings, I'm not able to add Termux:API notifications to my Mi Band 4.
Steps to reproduce
- Starting a notification:
termux-notification -c "content" -t "title"
-
A notification appears where the app name is Termux:API, title and content as given per command call.
-
Only a long press on the notification gives the ability to disable notifications?
Expected behavior
Seeing the notification appear from the app Termux. Or making Termux:API visible to the Android app notification settings list.
Additional information
Output of command termux-info
:
Updatable packages:
termux-tools/stable 0.73 all [upgradable from: 0.72]
Subscribed repositories:
https://dl.bintray.com/grimler/science-packages-24 science/stable
https://dl.bintray.com/grimler/game-packages-24 games/stable
https://termux.org/packages stable/main
System information:
Linux localhost 4.14.117-perf-g8035d1a #1 SMP PREEMPT Fri Nov 1 20:45:33 CST 2019 aarch64 Android
Termux-packages arch:
aarch64
Android version:
10
Device manufacturer:
Xiaomi
Device model:
MI 9
Notification from termux-notification
listed in termux-notification-list
:
[
{
"id": 0,
"tag": "7a45dc41-aa67-48b1-8a59-11ce3eb02855",
"key": "0|com.termux.api|0|7a45dc41-aa67-48b1-8a59-11ce3eb02855|10174",
"group": "",
"packageName": "com.termux.api",
"title": "title",
"content": "content"
},
]
Additional info, may be totally unnecessary for the issue above...
Notification (Outlook new email) that also appears on my Mi Band 4, output from termux-notification-list
:
[
{
"id": 1,
"tag": "notifGroup:32768",
"key": "0|com.microsoft.office.outlook|1|notifGroup:32768|10176",
"group": "notifGroup:32768",
"packageName": "com.microsoft.office.outlook",
"title": "<sender name>",
"content": "Test Content"
},
{
"id": 2,
"tag": "32768:[0, 9, 0, 46, ..., -6, -80, 0, 0]",
"key": "0|com.microsoft.office.outlook|2|32768:[0, 9, 0, 46, ..., -6, -80, 0, 0]|10176",
"group": "notifGroup:32768",
"packageName": "com.microsoft.office.outlook",
"title": "<sender name>",
"content": "Test • Content"
},
]
Note: id: 2
is being displayed on my Mi Band and in the Android status bar. The number array is being truncated but the same in tag
and key
and may be the email address that appears after the app name but the numbers are weird. Not sure how to translate them, seems to range between -128 and 127. Gmail seems to encode them differently.
Notification from Gmail:
[
{
"id": 0,
"tag": "gig:-2:^sq_ig_i_personal",
"key": "0|com.google.android.gm|0|gig:-2:^sq_ig_i_personal|10092",
"group": "gig:-2:^sq_ig_i_personal",
"packageName": "com.google.android.gm",
"title": "<user name>",
"content": "Test"
},
{
"id": -8...,
"tag": "gig:-2:^sq_ig_i_personal",
"key": "0|com.google.android.gm|-8...|gig:-2:^sq_ig_i_personal|10092",
"group": "gig:-2:^sq_ig_i_personal",
"packageName": "com.google.android.gm",
"title": "<user name>",
"content": "Test"
},
]
gig:-2
and -8
are also being truncated.
I only listed Outlook and Gmail because they seem to generate two notifications for a single visible notification. When Gmail lists several grouped notifications then the format changes again ...