Latest posts from Codename One.
Blog
Search the blog
Packaging Java Apps for Xbox Developer Mode, and Why Consoles Need Help
Codename One targets iOS, Android, macOS, Windows, Linux, the web, watches, TVs and now embedded boards. There’s one major category missing: game consoles. The technical side looks manageable. A console is a computer with a GPU and a controller, and we already render through Metal, Direct3D and OpenGL ES and map controllers to game actions. They’re hard because everything about them sits behind a non-disclosure agreement. This week we took the first step that doesn’t need one. ...

Real-Time Java: Control Loops the Garbage Collector Never Stops
In Friday’s embedded Linux post I promised the hardcore part. A device with a touchscreen is one thing. A device that drives a motor, reads a force sensor or balances something is another, because the code that does that has deadlines. Miss one and the motor stutters, the reading is stale, or the thing falls over. The standard advice is that you can’t write that code in Java. The garbage collector will stop your thread at the worst moment. This post explains what real time actually requires, why that advice is usually right, how real-time JVMs like JamaicaVM and the RTSJ got around it, and the approach we took because we own the VM. ...

Pulse: Heart Rate Zones From the Watch to the Trainer's Screen
A spin class with a screen on the wall showing every rider’s heart rate zone is the kind of feature studios pay a lot for. It usually means a vendor’s hardware, a vendor’s app and a monthly fee per location. Underneath, it’s three hard integrations: reading a watch or a chest strap in real time, getting that reading off the phone fast enough to matter, and doing it on iOS and Android, which store health data in two completely different places. ...

Dash: An Endless Runner That Races Through Your City
Skirmish showed that most of a mobile game is app: the sign-in, the menus, the shop, the friends list, the pushes and the server. Dash is the second game template, and it is a different kind of game: an endless runner. A runner dashes down a track of lanes, jumps hurdles, slides under barriers and changes lanes around traffic. You can generate it from the Initializr today, under your own name and package, and the source is MIT-0. ...

Embedded Java: 20x Smaller Than Chrome, Faster Than Rust, Royalty Free
Embedded software has the hardest job description in our industry. It has to run for years without a reboot. It has to fit in whatever RAM and flash the bill of materials allowed, because every chip you add is paid for again on every unit you ship. It has to respond instantly on a CPU slower than a phone from five years ago. And now it also has to look like the phone app, talk to the phone app, and report to a cloud service, because that’s what customers expect from anything with a power cord. ...

Caches, Certificates, Streaming Uploads and a Simulator That Types
The templates this month (a bank, a streaming service, a messenger, a delivery service and a game) all have servers, and every server ran into something a modern web app takes for granted. This post collects what we added to the Codename One backend to fill those gaps. Several of them apply to the client too. Then there’s the simulator, which can now show a virtual keyboard and record a video of your app. ...

GrapheneOS, LineageOS, /e/OS and Others Are Now Officially Supported
This post is mostly about phones that don’t have Google at all: GrapheneOS, LineageOS, CalyxOS, /e/OS and other Android builds. Codename One now supports them officially. After that, a shorter update on the Android compatibility layer, which runs existing Android apps on iPhone, desktop and the web. GrapheneOS, LineageOS, CalyxOS and /e/OS I was a member of Team OS/2. I know what it’s like to use an operating system the big vendors forgot, and to find that half the apps you need just don’t start. People choose GrapheneOS, LineageOS and other AOSP builds for good reasons, usually privacy, and they deserve apps that work. There’s a business case too: when you support a niche operating system its users have learned to live without, you get the most loyal advocates your product will ever have. They notice, they remember, and they tell each other. ...

Reel: Your Own Streaming Service or Course Platform
Video is how a lot of businesses now talk to their customers. A gym sells classes, a university publishes lectures, a creator community wants its own home instead of renting space on someone else’s platform. They all need the same pieces: a catalog, a player that remembers where you stopped, uploads, moderation, payments and some protection for paid content. Reel is those pieces, the app and its server in one Java project. Like last week’s Skirmish, Parley and Savor, it’s a template you generate and brand, not a demo you admire. ...

Bastion: A Hardened Bank Template, and Crypto Wallets in Core
A large share of the teams building on Codename One are banks and financial institutions. They don’t ask me for a prettier list component. They ask how to pass a penetration test, what the auditor will want to see, and which protections actually work on which device. Bastion is my answer, written as code. It’s a virtual bank and a small exchange, the app and its server in one Java project. Customers hold dollars, euros, bitcoin and ether, move money, issue and freeze cards, trade, and withdraw coins to addresses they’ve allowed in advance. Staff verify the ledger and the audit trail. It’s a template you can brand, but mostly it’s a reference: every hardening technique in it is there so you can read how it’s done. ...

Your Swing and JavaFX Code on iPhone, Android and the Web
There’s a lot of Swing and JavaFX code in the world. Much of it is internal tooling and line of business software that works fine and that nobody wants to rewrite. Then someone asks for it on an iPad, or in a browser, and the answer has always been “rewrite it.” Codename One can now build a large share of that code for iOS, Android, the web and native desktop, as a native app with no JVM inside. SwingSet2 and Notepad, the JDK’s own demos, both build and run. This post shows what carries over, what it costs in size and start-up (less than the JVM), and why the parts that don’t carry over have better replacements in a client app. ...

Your Compose Code, on More Screens and Less CPU
If Codename One didn’t exist, Kotlin Multiplatform is probably the platform I’d choose. I prefer Java, but Kotlin is a good language, and KMP was one of the strongest platforms we measured against in the Flutter post this week. Its first take on UI leaned on heavyweight native widgets, the way React Native does. The team learned from that, and Compose Multiplatform today is a good product built by people who care about performance. ...

Flutter Better in Java
I usually blog about a feature the week it lands. This one landed a few weeks ago and was in development for months before that: Codename One can now take a Flutter app’s Dart source and build it as a Codename One app. The results are amazing. I held this post back because I know how explosive these claims are. I wanted the numbers to come from a CI job that runs on every commit instead of a benchmark I tuned once on my laptop. ...