A build waiting to be installed arrives with a sound
Every notification this app posts was on one IMPORTANCE_LOW channel, so all of them were silent -- including the row for a build that landed while nobody was looking, which is the one that carries the Install button and is the only thing here that is news rather than a report of something somebody just pressed a button for. A second channel rather than raising that one, because Android lets an app only ever lower an existing channel's importance: raising "work" in code would do nothing whatever on a phone that had already run this app, and the whole fix would be somebody finding it in Android's settings. The waiting row also has to undo the setOnlyAlertOnce every other row wants. It replaces the running row it grew out of -- same tag, same id -- and an update to a notification posted alert-once is silent however loud its channel is, which is exactly the arrival nobody is watching for. Measured on the API 36 emulator: pressing Update on a test project and going to the home screen posts the row on channel=ready, importance 3, with mSound resolved and mIsInterruptive=true, and the shade files it above its own "Silent" divider. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
adaeb0c0ad
commit
7bf10061e2
4 files changed
+70
-23
No files matched your search
@@ -935,6 +935,20 @@ mutable at runtime from the phone.
|
||||
`autoCancel`, so the tap that opens the app takes it away, and the app
|
||||
is where the truth about that build is -- which is the cheap answer to a
|
||||
case that costs a stale line in the shade.
|
||||
**There are two channels, and the difference is the sound.** Work in
|
||||
progress is `IMPORTANCE_LOW`, because a build is an ongoing report of
|
||||
something somebody just pressed a button for and the screen they
|
||||
pressed it on already says the same thing; the row waiting to be
|
||||
installed is `IMPORTANCE_DEFAULT`, because it is the arrival of
|
||||
something nobody was watching for and a silent one is a button nobody
|
||||
is told about. Two channels rather than one raised, because Android lets
|
||||
an app only ever *lower* an existing channel's importance -- raising
|
||||
the one that shipped would do nothing at all on a phone that had
|
||||
already run this app, and the whole fix would be somebody finding it
|
||||
in Android's settings. The waiting row also undoes the
|
||||
`setOnlyAlertOnce` every other row wants: it replaces the running row
|
||||
it grew out of, same tag and same id, and an update to a notification
|
||||
posted alert-once is silent however loud its channel is.
|
||||
`POST_NOTIFICATIONS` is asked for at startup beside the local-network
|
||||
one, and refusing it costs the watching rather than the work: the
|
||||
service still runs, and there is simply nothing to draw. The type is
|
||||
|
||||
Reference in new issue
Block a user