Oct 4 | 8:50 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Oct 4 | 9:25 AM |
Mathias | has entered the room |
Mark M. |
hello, Mathias!
|
Mark M. |
how can I help you today?
|
Mathias |
Hi there!
|
Mathias |
I have a bunch of questions related to notifications, hope you have time
|
Mark M. |
go right ahead
|
Oct 4 | 9:30 AM |
Mathias |
View paste
|
Mathias |
Forget point 2 btw, read more in your doc later
|
Mark M. |
inbox would seem to be a reasonable pattern
|
Mark M. |
either that, or just have a notification that shows the count of new events
|
Mark M. |
you could use BigTextStyle instead of InboxStyle, but I don't know what that would gain you
|
Oct 4 | 9:40 AM |
Mathias |
great, inbox it is
|
Mathias |
next one
|
Mathias |
View paste
|
Mark M. |
why does #1 exist?
|
Mark M. |
#2 and #3 are for events, so those make sense
|
Mark M. |
is #1 tied to a foreground service or something?
|
Oct 4 | 9:45 AM |
Mark M. |
personally, I would try to eliminate #1 and consolidate #2 and #3 into a single "something happened" notification
|
Mark M. |
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)
|
Oct 4 | 9:50 AM |
Mathias |
Yes, #1 is actually optional, its a setting. Its kind of a remnant from back in the day
|
Mathias |
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
|
Mathias |
*or
|
Mathias |
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
|
Mathias |
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
|
Mark M. |
my guess is that your minSdkVersion is below 24, though
|
Oct 4 | 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
|
Mark M. |
sorry!
|
Mathias |
hehehe
|
Mathias |
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
|
Mark M. |
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
|
Mark M. |
(and my progress indicator notification samples)
|
Mathias |
right, thats kind of the same use-case
|
Oct 4 | 10:00 AM |
Mark M. |
sort of, but mine is pretty simplistic (e.g., everything is held in RAM)
|
Mark M. |
you're certainly welcome to look at it, but I would not expect any major revelations, beyond how to use those APIs
|
Mark M. |
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
|
Mark M. |
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
|
Mathias |
i have great use of your pdf
|
Mark M. |
I am glad that it is proving to be useful
|
Mark M. |
the next office hours are tomorrow at 7:30pm US Eastern
|
Mark M. |
have a pleasant day!
|
Mathias |
u2
|
Mathias | has left the room |
Mark M. | turned off guest access |