Latest posts from Codename One.
Blog

Happy New Year – Looking Back & Forward
We are closing 2014 which has been a pretty eventful year for us where we finally solidified Codename One, looking into 2015 we have a lot of great plans ahead! The new year seems like a great time to discuss some of our short/long term plans for Codename One as we move forward and our general thoughts. But first I’d like to open with the things we did badly in 2014 and that we should probably improve in 2015: ...

Stabilizing The New VM
Its always a challenge to migrate to a new implementation and the new VM is no exception, we ran into several issues and are already hard at work fixing them. Currently resolved are: [ Issue 1149 ](https://code.google.com/p/codenameone/issues/detail?id=1149) ios.newVM causes exception on Calender.getTime() [ Issue 1151 ](https://code.google.com/p/codenameone/issues/detail?id=1151) array index out of bounds exception with ios.newVM=true We also fixed several other issues causing the build to be slower/larger and potentially less secure. The two fixes above are already in the build servers and the additional fixes will land tomorrow. ...

New Codename One iOS VM Is Now The Default
New builds sent for iOS will now use the new iOS VM by default, this will deliver a lot of new features: stack traces, 64 bit, xcode 6+ support, iPhone 6/6+ native resolution, no stall GC etc. We spent a great deal of time stabalizing the new VM but obviously it can’t be as mature as our existing XMLVM backend and so it is quite possible that you would run into issues that occur purely in the new VM. You can test that this is a new VM issue by building against the old VM using the build argument ios.newVM=false, assuming this is indeed a new VM issue please file a bug with a test case immediately. ...

Toolbar
One of the common requests we get from users is more customization for the title bar area with more flexibility e.g. placing a TextField for search or buttons in various ways. Chen recently took action on this by introducing the new Toolbar API that replicates some of the native functionality available on Android/iOS and integrates with features such as the side menu to provide very fine grained control over the title area behavior. ...

Lollipop Take 2 & iOS VM Stability
Our previous attempt at getting the new Lollipop behavior on Android OS 5 didn’t go as well as we had hoped. While we can’t find any device that failed we got a lot of community reports of various 4.x devices that just stopped working right after we made the changes recommended by Google. We tried to resolve them using several different tricks all of which proved futile. Eventually we just reverted the whole thing and went back to the drawing board, it seems Android fragmentation is worse than we feared. ...

JSON To Pojo Mapping
While the webservice wizard in Codename One is pretty useful for many things it still requires a proxy and Servlet container which might not be the right choice for everyone. Steve Hannah, created a pretty cool set of tools to map POJO’s (plain old Java objects) to JSON structures by using compile time object mapping. This eliminates the costs/issues of reflection while still delivering a programming experience that is on par with the one we get from Java SE webservice mappings. ...

Continuous Integration
Building enterprise mobile apps can be pretty challenging especially when dealing with rapid changes, prototyping and corporate development requirements. One of the tools that has really revolutionized this field is Jenkins and related CI tools that allow developers to instantly track failures back to a specific revision of their code commits with respect to QA work. Codename One was essentially built for continuous integration since our build servers are effectively a building block for such an architecture. However, there are several problems with that the first of which is the limitation of server builds. If all users would start sending builds with every commit our servers would instantly become unusable due to the heavy load. To circumvent this we are now introducing CI support but only on the Enterprise level which allows us to stock more servers to cope with the rise in demand related to the feature. ...

Round At Codemotion
I’ve had a lovely time giving a demo of Codename One at Codemotion Tel Aviv , one of the things that surprised me about the conference is that the sessions are so short (40 minutes) which gives very little time to actually get into code. So to fit both details about Codename One, Demo etc. and an app I had to narrow this down to the most barebone Codename One demo I could think of that could still be valuable. ...

SMS & Custom Commands
One of the problems in cross platform development is availability of functionality on one platform that is missing on another. Case in point sending an SMS message. Android, Blackberry & J2ME support sending SMS’s in the background without showing the user anything. They even support a form of intercepting incoming SMS’s to one degree or another (but that’s rather problematic). iOS & Windows Phone just don’t have that ability, the best they can offer is to launch the native SMS app with your message already in that app. ...

Static Garbage & Lollipop
As we wrote before our new Garbage Collector is designed for amazing speed an never locks, this worked really well for most cases but we started running into weird crashes that took us deep into the seemingly simple GC code and exposed flaw in our “no locking” approach. It seems that our assumption that we can just mark all the static objects was flawed since a thread might mutate the static (global) object while the GC is running. ...

Don't Block The UI
I’ve talked with many end users about their badly written apps grievances and I’ve come to the conclusion that it isn’t a matter of native vs. cross platform or even HTML. Its a frustration issue, driven by unintuitive apps (hidden gestures etc.) and slow performance. The slow performance bit is the most misunderstood, there is a “feeling” of sluggishness that people complain about but when users complain about performance its usually not related to that but rather something far more mundane… When users complain about performance its often over the infinite rotating wheel covering the entire UI (InfiniteProgress dialog in Codename One), which makes them stand around like idiots waiting for their phone to let them touch it again! ...

CallSerially The EDT & InvokeAndBlock (Part 2)
The last time we talked about the EDT we covered some of the basic ideas, such as call serially etc. We left out two major concepts that are somewhat more advanced. ** Invoke And Block ** When we write typical code in Java we like that code to be in sequence as such: doOperationA(); doOperationB(); doOperationC(); This works well normally but on the EDT it might be a problem, if one of the operations is slow it might slow the whole EDT (painting, event processing etc.). Normally we can just move operations into a separate thread e.g.: ...