Codename One Adds Single Java API for Widgets, Live Activities, and Dynamic Island

Codename One, an open-source framework for building native apps from a single Java or Kotlin codebase, has introduced com.codename1.surfaces, a unified API enabling home-screen widgets, Live Activities, Dynamic Island, Android ongoing notifications, and desktop floating widgets. The feature, delivered via pull request #5365, addresses a long-standing limitation where widgets could not rely on a running Java process or live component renderer. Instead, apps publish a serializable layout and a timeline of state maps, which the operating system stores and renders independently using its own platform technology. User interactions are handled through string action IDs rather than Java listeners, with taps launching the app and delivering the assigned action after startup. A built-in simulator preview tool allows developers to inspect, resize, and test widget timelines without requiring a physical device build.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in