Latest posts from Codename One.
Blog

I Am Your Density
This morning I was awoken by myself – or rather the 1985 version of myself. He (I’ll refer to the 1985 version of myself in the 3rd person here forward) was in a panic and was yammering about something to do with changing history. He asked why my pants were inside out, and I wondered why he was wearing a life preserver. According to him, he had driven a time machine from 1985 to this day (October 21, 2015) in the future to stop me from making a terrible mistake. I asked him: “What mistake?”, to which he produced a 3.5 inch floppy disk. ...

Rounded Corners, Gradients, and Shadows with CSS
Codename One provides you with the tools to craft a visually stunning and unique user interface via its pluggable look and feel. For simple use cases, you can define styles entirely by setting style properties either in code or the resource editor. However, to achieve best results (for anything more complicated than a solid background color with a rectangular border), you will often want to use image borders and backgrounds. The usual process for styling elements in Codename One is: ...

GUI Builder Walkthru
Since we announced the new GUI builder work we got quite a few questions in the discussion forum and offline so I prepared a quick video showing how the new GUI builder will look when released (more or less). Notice that a lot of things will change with the GUI builder but some things are pretty much fixed such as the basic architecture with the XML to Java process. This is unlikely to change much. ...

Integrating 3rd Party Native SDKs Part III
This is the third and final instalment in a series on integrating 3rd party native SDKs in your Codename One application. If you missed the first two chapters, I recommend you begin with part one before reading this tutorial, as it provides much needed context for the procedures described here. Part 2: Implementing the iOS Native Code Part 1 of this tutorial focused on the Android native integration. Now we’ll shift our focus to the iOS implementation. ...

Release Plan For 3.2 & New Approach To Demos
Codename One 3.2 is scheduled for Tuesday the 27th of October. In keeping with our successful 3.1 release we’ll use a very short one week code freeze on the 20th of October at which point we will only commit crucial fixes with code review. I hope we can land quite a few new features for the release, the GUI builder is getting very close although its still a very rough product and will only be featured as a “technology preview” showing the direction we are heading rather than a final product. ...

Integrating 3rd Party Native SDKs Part II
This blog post is part two in a three-part series on integrating 3rd party native SDKs into Codename One application. I recommend you start with part one in this series as it will give you much-needed context to understand the procedures described in part two and three. In part one, we described the design and development of the public API and native interfaces of the Codename One FreshDesk library. In this installment we’ll move onto the development of the Android side of the native interface. ...

Local Notifications on iOS and Android
We are happy to announce support for local notifications on iOS and Android. Local notifications are similar to push notifications, except that they are initiated locally by the app, rather than remotely. They are useful for communicating information to the user while the app is running in the background, since they manifest themselves as pop-up notifications on supported devices. Sending Notifications The process for sending a notification is: ...

Integrating 3rd Party Native SDKs Part I
This past Thursday, we held our fourth webinar, and the topic was how to incorporate 3rd party native libraries into a Codename One app. I used the recently released FreshDesk cn1lib as a case study for this webinar. As the topic is a little involved, I decided to break it up into two webinars. In part one, we focused on the public API and architecture involved in developing a wrapper for a native SDK, and walked through the native implementation for Android. ...

Updated Parse Lib, Tiling Performance, Decimals & Trees
The excellent Parse4cn1 library just announced version 1.1. The biggest new feature is batch operations but there are a few others that could be helpful. Overall the library was pretty solid before the 1.1 version and this is a nice improvement on top. Fabricio Cabeca contributed an interesting pull request that has the potential to improve performance nicely on most platforms. Hopefully we’ll fix the issues in this approach and get it up again. ...

New GUI Builder
Our GUI builder is the result of many twists and turns in our product line mostly due to corporate bureaucracy hacks and last minute deadlines from our days at Sun. Its also written using Swing which is pretty much a dead end API that isn’t seeing any maintenence and since FX is even worse off there isn’t much hope for the tools future. The GUI builder is also one of the most controversial parts of our UI. While it has its strengths and simplicities its UI could do with a facelift and its architecture was designed before tablets existed. It was designed when Apple just barely surpassed Blackberry sales and had just announced the iPhone 4 (first with Retina display). ...

Building A Chat App With Codename One Part 6
This will be the last installment of this tutorial which was pretty complete in the previous section already. We might have additional installments mostly for covering enhancements such as “invite a friend” and other similar capabilites but this is probably as good a place as any to finish the app and let you try it live. Native Push Up until now we used PubNub to implement the push functionality which is excellent especially if you opt for the paid option which can also persist messages and offers quite a few additional perks for an app such as this. However, when the app isn’t running PubNub can’t push anything and in that case we need an OS native push to send the message. ...

PSD to App: Converting a Beautiful Design into a Native Mobile App
This past Thursday morning, I hosted our third tech-talk/webinar for the community. The first two included tutorials that were targeted at absolute beginners. This time I wanted drill down and cover a more advanced topic: creating themes. Codename One provides extensive support for designing beautiful user interfaces, but it isn’t necessarily obvious to new developers how to achieve their desired results. A common workflow for app design includes a PSD file with mock-ups of the UI, created by a professional designer. ...