Android Question Problem in local notification

marcick

Well-Known Member
Licensed User
Longtime User
Hi all,
I'm working with NB6 on Android8+
If the app receive many notification, you can pull down the list from the top bar and delete all at once clicking on "cancel".
But when the app can run in the background with a foreground service (as for example in the background location tracking) also sticky notification is created. In this case, all the other notifications that the app generate are grouped to the first one. When you pull down the list you can cancel them only one by one with a swipe, but the "cancel" that would remove all of them in a shot is not selectable. Also, when many notification has arrived and have been grouped, you see in the top bar only the icon related to the foreground service. A quick look to the screen does not tell you if you really have notifications.

What I would like is:

1) a sticky notification icon that inform about the foreground service, as it is.
2) another notification icon (I would also use a different color to distinguish if really a new notification is arrived or not) that belong to a separate list, so that you can pull down and cancel all at once.

I did experiments with channels but did not have success.
Also playing with group notification does not bring me to the solution.
https://www.b4x.com/android/forum/threads/nb6-class-additional-functions.104319/#post-659242

Any help ?
 

marcick

Well-Known Member
Licensed User
Longtime User
Yes, after have noted what I described, I tried to create an Importance.HIGH channel for the foreground service and an Importance.LOW for my notifications hopeing to solve, but not.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Group notification more or less solve this, but in my opinion it create only confusion.
Besides the sticky notification of the service, you have the "summary notification" (unuseful to see it) and the other notifications.
I prefer the list of single notifications, but with the "cancel" active to delete them in a shot.
The sticky service notification should behave as if it belongs to another app.

@edit: I did a mistake following the sample for group notifications. Corrected it, now it works as I want.
 
Last edited:
Upvote 0
Top