Commit 79a6d12
committed
Implement cross-platform push completion handling for background tasks.
Added Display.notifyPushCompletion() to manually signal the completion of a background push task (e.g. playing audio).
On iOS, this delays the call to the system completion handler if the `ios.delayPushCompletion` or `delayPushCompletion` property is set.
On Android, this releases a partial WakeLock acquired when the push is received, preventing the device from sleeping during the task if the `android.delayPushCompletion` or `delayPushCompletion` property is set.
Updated `IOSImplementation`, `AndroidImplementation`, and `PushNotificationService` to support this logic.1 parent cebd1b5 commit 79a6d12
File tree
3 files changed
+39
-3
lines changed- Ports
- Android/src/com/codename1/impl/android
- iOSPort/src/com/codename1/impl/ios
3 files changed
+39
-3
lines changedLines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
283 | 297 | | |
284 | 298 | | |
285 | 299 | | |
| |||
2784 | 2798 | | |
2785 | 2799 | | |
2786 | 2800 | | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
2787 | 2812 | | |
2788 | 2813 | | |
2789 | 2814 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8115 | 8115 | | |
8116 | 8116 | | |
8117 | 8117 | | |
8118 | | - | |
| 8118 | + | |
| 8119 | + | |
| 8120 | + | |
| 8121 | + | |
8119 | 8122 | | |
8120 | 8123 | | |
8121 | 8124 | | |
| |||
0 commit comments