Codename One Adds Apple TV and Android TV Support via Single Codebase and CSS Media Queries

Open-source framework Codename One has extended its single-codebase approach to support Apple TV and Android TV, allowing developers to target both platforms from one Java or Kotlin project. The update introduces CN.isTV() detection APIs backed by native OS checks on both iOS and Android, enabling runtime identification of TV environments. A new CSS @media device-tv query lets developers apply ten-foot UI adjustments — such as larger fonts and prominent focus rings — directly in stylesheets without forking Java code. The same mechanism also completes previously incomplete @media support for the Apple Watch port, unifying form-factor adaptation across TV and wearable targets. Developers can set build flags to generate separate Apple TV or Android TV targets, with the feature covered by a dedicated CSS test suite and updated documentation.
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