-
Notifications
You must be signed in to change notification settings - Fork 433
Add manual push completion handler support for iOS #4335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manual push completion handler support for iOS #4335
Conversation
Added Display.notifyPushCompletion() to allow applications to manually signal when they have finished handling a push notification on iOS. This is useful for apps that need to perform background tasks (like playing audio) before the app is suspended. This feature is enabled by setting the build hint `ios.delayPushCompletion` to `true`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
Added Display.notifyPushCompletion() to allow applications to manually signal when they have finished handling a push notification on iOS. This is useful for apps that need to perform background tasks (like playing audio) before the app is suspended. This feature is enabled by setting the build hint `ios.delayPushCompletion` to `true`.
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 30 screenshots: 30 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
|
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.
…s (opt-in). Added Display.notifyPushCompletion() to manually signal the completion of a background push task. This mechanism is OPT-IN via the `delayPushCompletion` (or `android.delayPushCompletion`/`ios.delayPushCompletion`) build hint. If the hint is present and true: - Android: Acquires a `PARTIAL_WAKE_LOCK` upon receiving a push, preventing the device from sleeping until `notifyPushCompletion()` is called (or timeout). - iOS: Ensures the `remote-notification` background mode is enabled and delays firing the system completion handler until `notifyPushCompletion()` is called. If the hint is NOT present (default behavior): - Android: No wake lock is acquired. - iOS: The completion handler is fired immediately after the push callback. Updated `IOSImplementation`, `AndroidImplementation`, `PushNotificationService`, `AndroidGradleBuilder`, and `IPhoneBuilder`.
…s (opt-in). Added Display.notifyPushCompletion() to manually signal the completion of a background push task. This mechanism is OPT-IN via the `delayPushCompletion` (or `android.delayPushCompletion`/`ios.delayPushCompletion`) build hint. If the hint is present and true: - Android: Acquires a `PARTIAL_WAKE_LOCK` upon receiving a push, preventing the device from sleeping until `notifyPushCompletion()` is called (or timeout). - iOS: Ensures the `remote-notification` background mode is enabled and delays firing the system completion handler until `notifyPushCompletion()` is called. The builders (`IPhoneBuilder`, `AndroidGradleBuilder`) have been updated to check for this hint and automatically: 1. Inject the permission (Android) or capability (iOS) into the native project configuration. 2. Inject the `delayPushCompletion` property into the runtime environment so the logic in `PushNotificationService` and `IOSImplementation` activates. Updated the developer guide to document this new feature.
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
Corrected the placement of `notifyPushCompletion()` in `AndroidImplementation.java` to resolve the "java.lang.Override is not a repeatable annotation type" error caused by improper nesting with `notifyCommandBehavior`. This completes the cross-platform push completion support feature, which is OPT-IN via the `delayPushCompletion` build hint. If the hint is present and true: - Android: Acquires a `PARTIAL_WAKE_LOCK` upon receiving a push, releasing it only when `notifyPushCompletion()` is called. - iOS: Delays firing the system completion handler until `notifyPushCompletion()` is called. Builders have been updated to inject the necessary permissions and runtime properties. Developer guide documentation has been updated.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |







Added
Display.notifyPushCompletion()and updatedIOSImplementationto support manual push completion handling on iOS.This allows developers to delay the OS notification that the push has been processed, enabling background tasks such as playing audio to complete.
The functionality is controlled by the
ios.delayPushCompletionbuild hint.Also updated
DisplayandCodenameOneImplementationto include the new method.PR created automatically by Jules for task 10512632328374437039 started by @shai-almog