Latest posts from Codename One.
Blog

Seamless Crash Protection That Symbolicates Native Crashes
Friday’s release post introduced the new crash-protection system. This post is the detailed version: why it exists, what it does on the device, and how to turn it on. The motivation is portability. Every port we add widens the set of platforms an app can break on, and testing across all of them by hand does not scale. The old crash-protection tool emailed you a stack trace; that worked, but it did not symbolicate native crashes, and a busy app could bury you in mail. The new com.codename1.crash package replaces it with something seamless, and the seam it removes is the work you used to do yourself. ...

Just Watch
Friday’s release post announced wearable support. This post covers both wearables in detail: how watchOS works, how Wear OS differs, and the small amount of code you write to reach either one. Why a watch API at all Apple sees watch programming as a completely separate discipline from phone or desktop programming. It is a different API with a different logic, and that makes some sense given the device. The consequence is that several UI metaphors we take for granted are impractical or absent: there is no text field in the form you expect, and no browser. So it is fair to ask what the point of a watch API even is. ...

Java To Native Linux App: One 5MB Binary, x64 And Arm
Yesterday’s release post introduced the new native Linux desktop port. This post is the detailed version: what it is, why the hard parts were hard, and how to build one. The Linux port is the structural twin of the native Windows port from last week. It is the same idea the iOS port has used for years: ParparVM translates your Java and Kotlin bytecode to C, and the C is compiled and linked into a native binary. On Linux that binary is a single self-contained ELF. There is no JVM on the user’s machine, none bundled, none downloaded, and none required. ...

Native Linux, Apple Watch, A Game Builder And Crash Protection
This week brings a native Linux desktop port, an Apple Watch and Wear OS port, a visual Game Builder with a high-level gaming API, and a new crash-protection system, with a tutorial following each one over the coming days. There is also a large piece of work that you mostly should not have noticed: we rebuilt the build cloud, and that rebuild caused a few failed builds along the way. More on that below. ...

Print Anywhere, And Put Your Cards In Apple Wallet
The last two items in this week’s release are platform integrations that business apps ask for constantly: printing a document, and getting a payment card into Apple Wallet. Both are the kind of feature where the cross-platform story usually ends and a pile of per-platform native code begins. Both are now core APIs. Printing: one call, five platforms PR #5217 adds com.codename1.printing, a deliberately small API: hand a document to the platform’s printing system, typically through the native print dialog, and hear back once about how it went. ...

Java To A Native Windows EXE: No JVM, 5MB, x64 And Arm
If you were around Java forums in the late nineties you remember the threads. “How do I compile my Java program to an EXE?” was asked constantly, answered badly, and locked periodically. The real answer for most of three decades was: you don’t, you ship a JVM. Wrapper tools bundled a runtime next to your jar; the result was a directory pretending to be a program. ...

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. ...