Latest posts from Codename One.
Blog

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.: ...

Side Swipe
Chen’s been busy with some customers on a feature that is often requested: mailbox like swipes. This effectively allows you to swipe a component to the side in order to reveal capabilities underneath e.g. edit, delete etc. Using this capability is really trivial just use something like a a MultiButton and place it in a SwipeableContainer with the bottom Container which includes the various actions as such: ...

Admob Interstitial Ads & Supertabs
Ram (the developer of yhomework ), wanted to improve his ad revenue on Android/iOS thru interstitial (full screen) ads and integrated those using native interfaces. Kindly enough he contributed these changes back and Chen packaged this as a cn1lib which you can now easily use to add support for full screen ads to your Android/iOS apps . On a different subject a long time RFE has been the ability to customize the tabs using a more powerful API. The main blocker for that has been the hardcoding of Buttons (or really radio buttons) as tabs in the Tabs component. ...

Mighty Morphing Components
One of the nice effects in the Android material design is the morphing effect where an element from the previous form (activity) animates to become a different component on a new activity. We’ve had a morph effect in the Container class since the original beta of Codename One but it didn’t work as a transition between forms and didn’t allow for multiple separate components to transition at once. ...

64 bit & OSS VM
Apple Just announced they will mandate 64 bit for all new submissions starting February 2015, luckily we are very prepared for that and we already support 64 bit builds in our new VM. This is a huge triumph for the architecture of our new VM which is very resilient to changes Apple might make in the future thanks to its pure C architecture. Our old XMLVM based approach is limited in that regard since it relies on the Boehm garbage collector which in turn relies on low level assembler and memory layouts heavily. Our new VM is both faster and more portable; now its also open source! ...

CallSerially The EDT & InvokeAndBlock (Part 1)
We last explained some of the concepts behind the EDT in 2008 so its high time we wrote about it again, there is a section about it in the developer guide as well as in the courses on Udemy but since this is the most important thing to understand in Codename One it bares repeating. One of the nice things about the EDT is that many of the concepts within it are similar to the concepts in pretty much every other GUI environment (Swing/FX, Android, iOS etc.). So if you can understand this explanation this might help you when working in other platforms too. ...

Migrating To Androids In-App-Purchase 3.0
** Updated: ** Originally this article referred to a system based on Display.setProperty for distinguishing consumable types. This turned out to be an issue in beta testing and was replaced with either a naming convention or build argument. Google announced a couple of weeks ago that Android’s In App Purchase 2.x API will be retired soon and all code should be migrated to version 3.0 of the API. Unfortunately version 3.0 is a big departure from version 2.0 which we currently support and its difficult for us to support both so unlike the normal case where we try to maintain compatibility with build arguments we will make a clean break to 3.0. ...

JavaOne Booth, iOS 8 Issues & More
I just published a LinkedIn article discussing the financials of a JavaOne booth, if you are a startup/vendor looking at conference booths I hope this provides some much needed transparency. I know that when we researched the issue the lack of information was very problematic. iOS 8 introduced a few regressions into Codename One which should now be mostly resolved. This is mostly due to Apple discarding support for some features that were previously deprecated but they didn’t offer any alternative for those features which is a bit of a problem. As a result of this the behavior of the picker component is somewhat different on iPhone’s running iOS 8. ...

JavaOne 2014 Trip Report
This is going to be a radically different trip report, we weren’t just talking at Java One this year we were actually presenting with our own booth and would probably do so again next year. Last year we tried to purchase a booth as well but were unable to get in contact with the right person at Oracle before the conference sold out (which was a shame, I understand some pavilion space went for free). This year we were ready though and were able to secure a small space but it turned out to be a great conference to us and we got the word out far/wide. On the right you can check out Chen & Myself at our booth just as it was setup. ...

CN1ML & JavaOne
Shortly after introducing Mirah support for Codename One , Steve is back with something that is arguably even more impressive. Over the weekend Steve released a tool called CN1ML which is an HTML subset markup language that allows you to effectively build Codename One UI’s with HTML. This isn’t another embedded webbrowser or HTMLComponent, this is a tool that statically translates HTML syntax into Codename One components. The benefit here is that you can keep all the advantages of using Codename One widgets (portability, performance, customizability etc.) with the HTML like syntax. ...

Second Annual Wristband Donation For Oracle Employees
At JavaOne/Oracle Open World the wristband allows you to attend the " appreciation event " featuring Aerosmith, Macklemore & Ryan Lewis and Spacehog. Unfortunately Oracle employees don’t get the wristband that allows everyone to attend that event! So I’m personally giving away my wristband and we might get some additional wristband donations to give away to Oracle employees so if you are an Oracle employee just retweet our tweet representing this article and/or share this via Facebook (publicly) then drop by our booth to log your name/email. ...