Latest posts from Codename One.
Blog

Clone and Run Codename One Demos In Single Line of Code
We have loads of demo Codename One apps hosted on Github, however cloning and running a project can be a little tricky because we generally don’t publish the dependent jar files (e.g. CodenameOne.jar) in the Github repository. This helps keep the repository lean, but it adds some steps to the process of cloning and running the project. For use cases like this, you may want to try the Codename One CLI tool, as it provides many useful functions directly on the command line. In this post I’ll demonstrate how you can easily clone a Codename One project from Github and run it in the Codename One simulator using a single line of code. ...

Uber vs. Clone – Spot the difference
I’ve been working on creating a clone of the Uber app for our upcoming update of the Build Real World Full Stack Mobile Apps in Java course. There is a lot to go through there but the basics are surprisingly easy. E.g. this is the login form for the native Uber app on my Android device next to my clone mock code also on the same Android device… See if you can spot which one is mine. You can see a high resolution version of the image here: ...

Codename One 3.8 is Live
We are thrilled to announce the release of Codename One 3.8. Codename One is an open source “Write Once Run Anywhere” mobile solution for Java developers! This new release significantly refines the native look and feel of Codename One, it brings the GUI builder to a new level with styling support. It finally adds Mac OS appstore distribution support which means all the major appstores are now supported targets for Codename One applications. ...

Tutorial – What is Codename One
I published this video a while back but it was longer and a bit confusing (over 40 minutes). Since some developers watch it before getting into Codename One I thought it would be in order to streamline it into a more manageable length and transcribe the content like I did with the newer videos. I also cleaned it up a bit and the result is below. You can also read the full transcript within this blog post and use the captions that are a part of the video. ...

Mac Appstore Builds & Device Farms
Steve has been pretty busy. We have new support for Mac Appstore builds as part of our desktop build process. That means you can build a signed Mac desktop app with Codename One which required a bit of work with previous releases. He also adapted our automated tests for Codename One so they would run on device farms and test against major versions of Android. Mac Builds In order to use these changes you’ll need to install the latest release candidate for Codename One which includes an updated version of Codename One Settings. Once you do that check out this new section of the developer guide that covers the process of building and signing the Mac app. ...

Codefreeze for 3.8
Codename One 3.8 should land one week from now and from later today we are effectively in code freeze. Please update to the release candidate of 3.8 tomorrow morning to help us track some last minute bugs and regressions. As is usually our process we will release updates as necessary with code reviews and next week we won’t have the usual set of releases as we’ll take some time off. ...

Tutorial – Working with Images and Densities
We had a lot of posts covering images, multi-image and density. It’s one of the more challenging concepts to explain to developers coming from a desktop development background. Density is a simple concept to explain but the implications of it are sometimes counter-intuitive e.g. which device has higher density: Your phone or your 4k TV? The answer is your phone and I explain why in the video. I also discuss the need to adapt UI’s for tablets to make better use of the available space although I don’t go deep into that subject. It might be worth covering that in a separate video, I discuss this in the academy though… ...
Pixel Perfect – Text Input (Part 2)
Last week we discussed the first part of working with text components and left some big tasks for this week. This week we’ll try to address the remaining issues with text input and make it easier to construct UI’s. This is crucial as we’ll be going into code freeze soon and we need enough time to iron out the issues in the text input. Last week I ended the post with this set of tasks: ...

New Milestones and Features
We will enter code freeze for Codename One 3.8 next week and have a lot of things to clear off the table in order to get there! The first order of business is that there will be no Codename One 3.9… Instead we will go right to 4.0 and switch to major version number update scheme only. This will align us better with industry standards. We spent ages in 3.x and far less in 1.x or 2.x numbering. That doesn’t make sense. It’s hard to tell what feature is big enough for a “major version number update” and it doesn’t indicate as much with the fast pace of releases. So switching to major version numbers in terms of milestones will simplify and give a better indication of the work we put in. ...

Tutorial – Creating Lists
Some of our how do I videos are so old it’s embarrassing… This is especially true for some core concepts videos as they were some of the first ones we made. The worst part is that these are probably the most important videos we have as they are viewed by developers completely new to Codename One. We had two videos covering creations of lists and both of them used com.codename1.ui.List with the old GUI builder! ...
Pixel Perfect – Text Input
I started working on this post back in August and so much happened in between I just had to scrap the whole thing and start over again… I’ve discussed buttons before and now it’s time for TextField & TextArea. But before we go into that lets take a moment to talk about the problems that arose from the last installment of pixel perfect. I made a lot of changes to Codename One but there was one particularly painful change: caps text. This proved to be a far more controversial change than I had intended and I had an interesting debate with Nick. I’d appreciate participation in the thread there or here. The gist of the debate is how can we change functionality people rely on without disrupting working code. I honestly didn’t think the caps text change was a big change or would cause the problems it did. However, having said that it’s really hard to rollout a feature without disrupting developers occasionally. ...

TIP: Map Layout Manager
__ The information in this blog post is slighly out of date. Check out the newer blog post that covers positioning components on the map. I’ve recently added a segment to the online course covering the native maps. This segment is a part of a larger trend towards the upcoming Uber demo which we will release before the end of the year. As part of that work I did some initial “half baked” work on a map layout manager. ...