Latest posts from Codename One.
Blog

Build Games In Java: Sprites, Box2D Physics And Low-Latency Sound
A confession before the feature tour: for years I was very much against adding gaming to Codename One. I used to work in the gaming industry (Jane’s USAF, among others), so this was never about disinterest or not understanding the domain. The opposite: I knew exactly how much a real gaming stack demands, and I felt that tackling it would dilute our focus on being the best cross-platform app framework. But at the rate we have been building up Codename One lately, it has become a manageable and realistic target. ...

3D Graphics Without Writing Shaders: The Portable GPU API
Cross-platform 3D is one of those problems that looks impossible when you list the constraints. iOS wants Metal and Metal Shading Language. Android wants OpenGL ES and GLSL. The web wants WebGL. Windows wants Direct3D and HLSL. Every one of these has its own shader language, its own pipeline model, and its own buffer semantics. Most portable engines solve this by making you write shaders multiple times, or by adopting a giant dependency that becomes your whole application. ...

Native Java Win32, 3D Gaming, Printing and Wallet
This week we’re introducing native Windows support (no JVM!), a 3D graphics API, a gaming API, support for Apple Wallet, printing and more in what is probably our biggest update ever… But that’s not the thing that excites me the most. The thing that excites me the most I won’t tease you about this too much. The thing that excited me the most this week is this new article by Francesco Galgani introducing Codename One, published on Baeldung. Beyond the great writing and form, the excitement is about the community: the way you’re all using Codename One and helping us build it. The issues, the tracking, and the enthusiasm about upcoming features, like this one where a request to consolidate documentation chapters opens with a triple thank-you for the game development API before it even gets to the point. ...

Background Work, Push Topics, And Richer Notifications
The work that happens while your app is not in the foreground has always been the fiddly part of mobile development, and Codename One’s coverage of it had gaps. PR #5142 modernizes local notifications, push, background execution, and shared content across the core, JavaSE, Android, and iOS, and importantly it makes all of it work in the simulator so you can iterate without a device. ...

A New Advertising API, Built From The Ground Up
Advertising support in Codename One had quietly rotted. It was spread across three mechanisms that no longer work: the original com.codename1.ads and FullScreenAdService APIs built on the long-dead InnerActive and V-Serv networks, the decade-old google.adUnitId and mopubId banner build hints (MoPub is gone), and an AdMob cn1lib that was interstitial-only, built on iOS APIs Google has since removed, busy-polled, and had no consent flow. None of them supported rewarded, rewarded-interstitial, app-open, or native formats, GDPR consent, iOS App Tracking Transparency, server-side reward verification, or mediation. ...

WebSockets, gRPC, And GraphQL In The Core
Three connectivity features landed together this week, and they belong in one place because they build on each other. WebSockets moved into the core; the GraphQL client uses that same WebSocket support for subscriptions; and gRPC reuses the exact code-generation pattern GraphQL and OpenAPI already follow. This post is a tutorial for all three. By the end, you will have a live chat, a typed GraphQL client, and a typed gRPC client, and you will see how little code each one takes. ...

Your Codename One App, Now A Native Mac App
Codename One has run on the desktop for a long time through the JavaSE target, which is the same engine that powers the simulator. What it did not have was a real native Mac binary, and the desktop output still carried a lot of phone-shaped habits: a drawn toolbar where the OS menu bar belongs, scrollbars you could not grab, no place in the menu for Preferences or Quit. With version 7.0.250 we finally have an actual native macOS application target that doesn’t bundle a JVM and is as native as our iOS target. ...

Mac Native Builds, Live Protocols, And Open Issues Under 350
Our focus was all over the place this week with work that targeted many different directions: desktop, monetization, communication, media, and more. This fits with our roadmap of one platform that delivers the promise Java never delivered: WORA for Everything Everywhere. But before we dig into the new features, there’s one number I’m particularly proud of… Open issues are under 350 The open issue count is now below 350 (332 at the moment of this writing). That is the result of a deliberate pass through the tracker, closing things that were already fixed, reproducing the ones that were not, and fixing a batch of them outright. Some of the reports we closed this week had been open since 2015. We got a little side-tracked in the process (it is hard to read an old report without wanting to fix it on the spot), but the direction is set: we want this number to keep dropping, and by a lot. ...

We Will Not Sabotage Your Code
This is a very low bar. I am genuinely saddened that I need to write it down at all, because until last week it seemed too obvious to say out loud. Last week the news broke of an open source developer doing something I find reprehensible. The short version: fed up with “vibe coders,” he embedded a hidden prompt aimed at AI agents inside his framework, with instructions designed to destroy data on the machines of people who used it. ...

OpenAPI, ORM, SVG and Lottie
This is the third follow-up to Friday’s release post. Saturday’s was about how you iterate; yesterday’s was about new platform APIs in the core; today’s is about a run of pieces that change how you write the structural parts of an app. The pieces are an OpenAPI client generator, a SQLite ORM, JSON and XML mappers, a component binder with validation, build-time SVG and Lottie transcoders, and a declarative router with deep links. All ride on a single build-time codegen pipeline: a Maven-plugin pass that reads annotations or declarative source files at build time and emits typed Java that compiles into your binary. No reflection, no service loader, no Class.forName. The “How it works” section at the end of this post covers the codegen plumbing once you have seen what it powers. ...

AI, OAuth, And Other Platform APIs In The Core
This is the second follow-up to Friday’s release post. It covers the platform APIs that moved into the framework core this release. There are two headline pieces (AI / LLM and the modern OAuth / OIDC stack), and two smaller pieces (WiFi / connectivity and share-sheet result callbacks). This continues the direction the previous release set when we moved NFC, biometrics, and cryptography into the framework core. The full background on that earlier set is in NFC, Crypto, Biometrics, And A New Build Cloud. ...

On-Device Debugging And JUnit 5
This is the first follow-up to Friday’s release post and it covers the two changes from this release that affect how you iterate on a Codename One app rather than what the app itself does. On-device debugging that treats Java as Java on a real iPhone or a real Android device, and standard JUnit 5 against the JavaSE simulator. The first is the one we have been wanting for a long time, and is the one that takes the most explaining, so most of the post is about it. ...