Latest posts from Codename One.
Blog

Beating The ARC
For the uninitiated, ARC is Apple’s term for Automatic Reference Counting. Objective-C uses a reference counting scenario to collect objects which is pretty painful to work with. Personally I preferred C/C++’s manual delete/free to the Objective-C semantics. But a couple of years ago Apple introduced ARC in which the compiler implicitly inserts the retain/release reference counting logic. While its a big improvement its still a reference counter with many of the implied limitations. It solves 95% of your memory handling logic leaving the hardest 5% for you to deal with manually but it does have one advantage over a GC: determinism. Since memory is deallocated immediately it provides consistent performance with no GC stalls. ...

Understanding Peer (native) Components & Why Codename One is so portable
I’ve had some talks with rather savvy Codename One developers recently which made me realize that quite a few developers don’t truly grasp the reason why we have a separation between peer (native) components and Codename One components. This is a crucial thing you need to understand especially if you plan on working with native widgets e.g. Web Browser, native maps , text input, media and native interfaces (which can return a peer). ...

VM Stats
If you haven’t yet filled out the developer economics survey please do so now! We are still short of 30 entries in order to get better logo placement in the released survey. This is important since the people who read these surveys are of a demographic that’s much harder for us to reach normally. It would help us greatly if you would convince your friends to fill this out as well. Thanks. ...

Screenshots and Graphics Update
If you read the article about the 7 screenshots of iOS you might have wondered whether you can just supply these screenshots yourself? Well, now you can. Our build server will now generate the screenshots only if they don’t already exist in the jar so you will need to create the right png images in the exact resolutions mentioned below: Default.png – 320×480 Default@2x.png – 640×960 ...

New VM
You might have noticed things have been a bit quiet with new features recently. That is because we had a bit of a holiday around here and because we spent a great deal of time working on a new VM for iOS. This work is still ongoing and basic things such as the garbage collection scheme are still incomplete but we are now ready to talk about the motivations and direction with this new VM. ...

Placing
Up until now debugging location oriented applications in the simulator was a bit painful, there was no real way other than coding to a specific location and if you relied on specific GIS data you couldn’t easily debug that case. Chen was working with an enterprise customer and got fed up with that so he built a UI which you should be able to access via the Simulator menu in the next update. This UI allows you to drag a Map to determine your current location in the location API. It will fire the appropriate events and allow you to define the GPS states. This should make the lives of those of you building location aware applications much easier! ...

Please Help Us By Filling The Developer Economics Survey
The last time we had a developer economics survey you guys really came thru and made us one of the top contributors for that survey! This year the stakes are even higher and the incentive for referrals is greater, if you want to help us promote Codename One to a people outside of the core Java developer community then please fill out this survey using this link: http://www.vmob.me/DE3Q14CodenameOne . Please also help us by distributing this link as far as you can! ...

Leading
One of our enterprise accounts was using lead component in a rather unique setting and needed a way to “unlead” essentially disable the lead component functionality which is one of those things we never imagined people doing. As a result we allowed setLeadComponent(null) to effectively “do the right thing” for most cases. This reminded me that lead component is something that we definitely need to cover again, the developer guide barely touches the subject that is one of the most powerful concepts we have. ...

New Android Pipeline Fixes
We introduced a new rendering pipeline for Android a while back, it showed a lot of potential but unfortunately still had some major bugs. Chen just made some major fixes for this pipeline which should hopefully address those issues, please start testing your app with this pipeline and let us know if you experience regressions as a result of that. To test the new pipeline just define the build argument android.asyncPaint=true ...

Windows Phone Improvements & Build Screenshots
A lot of developers have asked us for QR code support on Windows Phone 8, we finally took the plunge with the first attempt here. It seems QR support for ZXing on Windows Phone is WAY behind the level on Android or iOS. As part of that work we made some additional Windows Phone improvements including integration with the native image gallery (via the show gallery API in Display), email, SMS API support and more. ...

Androids Permissions
One of the annoying tasks when programming native Android applications is tuning all the required permissions to match your codes requirements, when we started Codename One we aimed to simplify this. Our build server automatically introspects the classes you sent as part of the build and injects the right set of permissions required by your app. However, sometimes you might find the permissions that come up a bit confusing and might not understand why a specific permission came up. This maps Android permissions to the methods/classes in Codename One that would trigger them: ...

Processing, Responsiveness, Native & more
Some of you have already noticed a build error when building for iOS if you used the processing package. This is due to a small change we made to the package where we replaced all usage of Hashtable/Vector with Map/List. That allows the processing package to work with the new parseJSON method that returns the new collection code and thus be MUCH faster on iOS. Unfortunately due to the way java codes method signatures you need to update the libraries in order to for this change to work, we automatically update the libraries when you send the build but that means you will need to send again if you get that failure. ...