Commit e705a8a
committed
docs: [SDK-5083] correct why the demo extender is conditional
The comment claimed an extender makes the SDK display a data-only push, so
installing a no-op one would not be inert. That is not how 5.x behaves.
processHandlerResponse gates on canDisplay, a non-empty notification body,
before it reaches shouldDisplayNotification, so hasExtender() is never read
for a bodyless push and an extender cannot rescue one.
The code stays as it is. Setting an extender only when a switch needs one is
still right, just for the duller reason that nothing asked for it otherwise.
Left uncorrected, a customer reading the demo could design around SDK
behavior that does not exist.1 parent 18bd2bc commit e705a8a
2 files changed
Lines changed: 6 additions & 4 deletions
File tree
- examples
- demo/app/src/main/java/com/onesignal/example/notification
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
0 commit comments