Latest posts from Codename One.
Blog

Handling The Exception
Handling errors or exceptions in a deployed product is pretty difficult, most users would just throw away your app and some would give it a negative rating without providing you with the opportunity to actually fix the bug that might have happened. Google improved on this a bit by allowing users to submit stack traces for failures on Android devices but this requires the users approval for sending personal data which you might not need if you only want to receive the stack trace and maybe some basic application state (without violating user privacy). ...

The Move To Java 5 And New Cloud E-Mail Support
We started moving the usages of Vector and Hashtable to use Map/Collection/HashMap & ArrayList. This follows our release of the full source code for our modified version of retroweaver and the Java packages that go with it. Recap: we had to change retroweaver which was designed to allow Java 5 code to run on Java 2 in order to get it to work with CLDC which is missing MANY features. ...

Big Batch Of Features
We’ve been so busy this past month that we just forgot mentioning many of the features that went into Codename One in June and there are MANY small features that just didn’t get a blog post or even a mention! We just open sourced a major piece of our backend code, the changes to retroweaver and library code that allow us to compile Java SE 5 code to J2ME/RIM. With this change in place we will start using Java 5 features throughout the code but mostly transition towards using ArrayList/HashMap and the base collection interfaces rather than Vector/Hashtable. ...

Longstanding Issue Of Back Button In BiDi/RTL
We’ve had a long standing annoyance with Codename One’s RTL (Right To Left languages, e.g. Arabic/Hebrew etc.) where the back button was still pointing in the wrong direction on iOS. This was REALLY annoying to such a great extent that up until recently we recommended that people don’t use RTL on iOS devices. Well we finally fixed it, what took us so long was the desire to “do it right” but we couldn’t figure out what the right thing was? ...

Hands-on With The Blackberry Tools On The Z10
Note: skip to the bottom for some instructions on working with the BB Z10. Lately we’ve been asked by one of our pro customers to fix some issues which occurred only on the z10 device. I thought this would be an easy task: just grab the tools from the blackberry site and then use them to debug the issue. I was quite wrong… Apparently the emulator can only run in a virtualization environment. ...

Improving The iOS Port – Moving To Full Java 5 Support
We constantly try to improve the performance, speed and build speed of the various ports most importantly the iOS port. Steve found out a while back during his investigations that the synchronized keyword is especially slow in our iOS port, this is something that isn’t trivial to fix in the port itself. I made some work the past couple of days of mitigating the problem by adding usages of a StringBuilder like class and removing synchronization (which never worked anyway) from TextArea. This provided very dramatic and noticeable performance improvements on iOS. ...

GZip Support
We now have new support for GZipInputStream and GZipOutputStream thanks to the great work done by the guys in the JZLib project, we ported their work into the project class hierarchy and added a GZConnectionRequest which will automatically unzip an HTTP response if it is indeed gzipped. By default this class doesn’t request gzipped data but its pretty easy to do so just add the HTTP header ...

iOS 7 Support
Apple just announced iOS 7 support the other day and it includes quite a few UI changes. We are already working full speed at incorporating support for iOS 7 before the general availability of the OS and have already released an initial skin through the OTA download feature (it will only work properly with the next plugin update). The trend towards simpler flat design is great since we can now create applications that look good/consistent on all platforms much more easily than we could in the past and we will probably update our themes to incorporate more of the flat design concepts as we move forward. ...

Walk-thru Tutorial
Codename One Maker is a pretty elaborate app, there is only so far we can go with simplifying the app itself. So we added a tutorial mode which is common in mobile/web apps , to walk the user through the process of creating a simple application and using the GUI builder (we also added a Udemy course but I digress). This feature is probably useful for almost every app out there, so here is how you can achieve that with Codename One… ...

Bouncy Castle Crypto API
We’ve got many requests in the past year for a cryptography API, initially we thought about adding something like this to the core but it seems somewhat niche so we decided to wrap up this great open source project and re-package it as a CodenameOne lib.The project is supported on all CodenameOne platforms right out of the box without any changes. You can download the full source code as well as a compiled binary from a Google code project here: https://code.google.com/p/bouncy-castle-codenameone-lib/ and you can download the compiled binary from here: BouncyCastleCN1Lib.cn1lib (since Google removed the download section for new projects). ...

When A Dialog Isn't A Dialog
One of the things we’ve been working on with Maker is getting the new GUI builder to support hierarchies/layouts which should be landing tomorrow or so. When we initially built the GUI builder within the Codename One designer we made many mistakes but one of the big ones was with layouts, it takes too long to see how a layout affects something (you need to physically accept a dialog/rinse repeat) so people just don’t experiment enough with the options. ...

Maker: On Device Drag & Drop GUI Builder + External 3rd Party Plugins!
The PC isn’t going away tomorrow but I think we took a major step in reducing the need for it when building some applications in the upcoming version of Maker. We just launched a very preliminary preview of our new Drag & Drop form designer for Maker. This is pretty rough early on, but having built quite a few GUI builders I can tell you that its 90% there! ...