Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4b5075b
Prompt for POST_NOTIFICATIONS so Android live activities can start (d…
shai-almog Aug 1, 2026
2717c61
Address review: bound the prompt, check foreground, read the manifest…
shai-almog Aug 1, 2026
9597059
Address review round 2: retire the count on any observed grant, count…
shai-almog Aug 1, 2026
4d74fc5
Address review round 3: serialize the notification permission request
shai-almog Aug 1, 2026
4c10300
Address review round 4: log the exhausted-budget refusal, correct two…
shai-almog Aug 1, 2026
2474926
Address review round 5: settle isSupported without a declaration, sco…
shai-almog Aug 1, 2026
f13af53
Address review round 6: put the settled diagnostics where the decisio…
shai-almog Aug 1, 2026
ad361de
Address review round 7: guard the prompt against reentrancy, scope th…
shai-almog Aug 1, 2026
76ded1e
Address review round 8: let a waiting start adopt the answer, put the…
shai-almog Aug 1, 2026
7cef8cf
Address review round 9: publish the request handoff atomically
shai-almog Aug 1, 2026
2703034
Address review round 10: hold the request open across the monitor han…
shai-almog Aug 1, 2026
ec842d5
Address review round 11: let the platform own the prompt for legacy t…
shai-almog Aug 1, 2026
ba24fe6
Address review round 12: do not let the capability check block the pl…
shai-almog Aug 1, 2026
349030d
Pre-grant POST_NOTIFICATIONS in the Android instrumentation suite
shai-almog Aug 1, 2026
ab56329
Add the missing license header to the device runner instrumentation test
shai-almog Aug 1, 2026
a64c5af
Address review round 13: check the manifest before the legacy bypass,…
shai-almog Aug 1, 2026
7fc392c
Address review round 14: gate the legacy channel creation on the fore…
shai-almog Aug 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CodenameOne/src/com/codename1/surfaces/LiveActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ private LiveActivity(String id) {
this.active = id != null;
}

/// Returns true when this platform can present live activities.
/// Returns true when this platform can present live activities, including when doing so still
/// depends on a permission the user has not been asked for yet (Android 13+ raises that prompt
/// from [#start(LiveActivityDescriptor, Map)]). It turns false once the user has refused that
/// prompt as often as `start` will raise it, or has switched notifications off for the app.
///
/// #### Returns
///
Expand All @@ -64,6 +67,13 @@ public static boolean isSupported() {
/// Starts a live activity. On unsupported platforms (or when the platform refuses, e.g. the
/// user disabled live activities) this returns an inert handle rather than throwing.
///
/// On Android 13 and newer the ongoing notification a live activity lowers to needs the
/// `POST_NOTIFICATIONS` permission, so the first start on a fresh install raises the system
/// prompt and blocks until the user answers. Start that first activity with your app in the
/// foreground: a background service or push handler has no UI to prompt from and the start is
/// refused. The prompt is raised at most twice across an install, after which [#isSupported()]
/// reports false.
///
/// #### Threading
///
/// Callable from any thread, and a background thread is the right one. Starting an activity
Expand Down
Loading
Loading