Office Hours — Today, October 4

Yesterday, October 3

Oct 4
8:50 AM
Mark M.
has entered the room
Mark M.
turned on guest access
9:25 AM
Mathias
has entered the room
Mark M.
hello, Mathias!
how can I help you today?
Mathias
Hi there!
I have a bunch of questions related to notifications, hope you have time
Mark M.
go right ahead
9:30 AM
Mathias
View paste
Notification grouping
I target Jellybean and up. 
I have finished push notifications with Firebase, works fine, although, i’m struggling a bit with how to best display notifications in the drawer…
My app sends event about users, for example “Petra has arrived at X at 15.30”
It can be a few during a day.

As you mention in the “advanced notifications” sections, separate notifications for each event is a pretty bad idea (maan all those icons in the statusbar)

So, i have two questions:

1. For my usecase, is “inbox-style” notifications the only/best way to go
2. Notification “groups”, is that only for wear-devices?

Any other things i should think about?
Forget point 2 btw, read more in your doc later
Mark M.
inbox would seem to be a reasonable pattern
either that, or just have a notification that shows the count of new events
you could use BigTextStyle instead of InboxStyle, but I don't know what that would gain you
9:40 AM
Mathias
great, inbox it is
next one
View paste
You could say i have three types of notifications:

1. a static one showing the current status of the user (working/not working)
2. Geofence notifications/reminders when a user enters/exits certain locations
3. These new event push notifications

Since i do not want to have one big/inbox notification for everything (i dont want to mix “hello do not forget to checkin” and “Petra has arrived at Big Ben”), there’s no getting around having three distinct icons i the top statusbar right? Looks so bad…
Mark M.
why does #1 exist?
#2 and #3 are for events, so those make sense
is #1 tied to a foreground service or something?
9:45 AM
Mark M.
personally, I would try to eliminate #1 and consolidate #2 and #3 into a single "something happened" notification
or at least make #1 optional, with alternatives that the user could use (e.g., home screen app widget, custom tile in the notification shade)
9:50 AM
Mathias
Yes, #1 is actually optional, its a setting. Its kind of a remnant from back in the day
call it a "poor-mans widget"
Mark M.
OK
Mathias
we show a notification with id 1 with text and icon displaying checked in our out
*or
About your suggestoin for consolidation, you'd then have inbox-style with a row per "event" then?
Mark M.
yes, I guess
Mathias
well, that brings me to next question
i find it unfortunate, in this case, that there's no way to simply group the different notification - so there'd be one icon if there is at least one notification, one header for my app, with an expandable drawer. I read up a bit on "groups", but that seems to have to do with wearable devices, am i correct here?
Mark M.
notification groups are available for mobile devices starting with Android 7.0, IIRC
my guess is that your minSdkVersion is below 24, though
9:55 AM
Mathias
yes its from 7 so i cant really use it, but more for the future
Mark M.
it may be something to consider for the future
Mathias
for my use-case. i'd have to fetch the inbox style-notification, and add a row, and change the header to "X events" or something - and switch out the oldest of the, for example, 5 notifications, and replace it with the new event. Is there any example in your omnibus that you think would be useful for me to look at?
Mark M.
no, I don't get into anything nearly that complex
sorry!
Mathias
hehehe
you do write about your email-inbox that does kind of that, no?
Mark M.
I have a small InboxStyle sample, but mostly just to demonstrate the API
I don't update it based on new data, IIRC
Mathias
ok
Mark M.
the only one that does that is the MessagingStyle one with the RemoteInput option, for inline chats within the notification
(and my progress indicator notification samples)
Mathias
right, thats kind of the same use-case
10:00 AM
Mark M.
sort of, but mine is pretty simplistic (e.g., everything is held in RAM)
you're certainly welcome to look at it, but I would not expect any major revelations, beyond how to use those APIs
and that's a wrap for today's chat
Mathias
but i mean - if i want to show the latest X events to the user, and i don't want one icon for each notification, don't you agree that i'd have to have an inbox style notification with something like the logic i described?
Mark M.
the transcript will be posted to https://commonsware.com/office-hours/ shortly
yes
Mathias
allright, cheers
Mark M.
my point is that my book examples don't exactly cover your scenario, so they will be of limited use
Mathias
no problem1
i have great use of your pdf
Mark M.
I am glad that it is proving to be useful
the next office hours are tomorrow at 7:30pm US Eastern
have a pleasant day!
Mathias
u2
Mathias
has left the room
Mark M.
turned off guest access

Yesterday, October 3

 

Office Hours

People in this transcript

  • Mark Murphy
  • Mathias