Latest posts from Codename One.
Blog

Aligning Prices
Our pricing has been inconsistent with the rest of the industry for quite some time specifically the price of the basic subscription which is a losing tier. Based on Industry norms the basic subscription should be far more expensive and doesn’t come close to covering the costs of running Codename One’s extensive cloud infrastructure. So on June 1st we will raise the price of the basic subscription to 19USD which is still very affordable. Notice that if you are a current subscriber or sign up before June 1st you can keep paying at the 9USD rate! However, if you let your subscription lapse we will not be able to recover it and you would need to switch to the 19USD level… ...

Storage Migration
Our iOS port has some pieces that are pretty old and haven’t been touched since we started, one of those things is the IO code which mostly works as we wrote it when we started Codename One. Unfortunately it seems that Storage in iOS is mapped to the iOS caches directory, this directory can be wiped by the iOS device if space on the device is running low. That’s a very rare occurrence which is why we didn’t pick that up until a bug report was filed on it this week… ...

JavaScript Port Cross Origin, Hints & Bugs
When building to the JavaScript target there are many build options and configurations. More importantly issues like cross origin need server side code that would be able to proxy such requests to make the client side code seamless… Steve wrote a rather detailed appendix to the developer guide covering all of those options from startup splash screen configuration to servlet proxy logic. The build also generates a ready to deploy WAR file which should make setting this up on any Java servlet container a nobrainer. ...

Demo Section & Russian Guide
We are working on a new demos section for the website that will highlight the demos for Codename One more thoroughly. Thanks to the new JavaScript port we can actually show the demos live in action but that creates a bit of a problem since people often jump to the conclusion that Codename One uses web technologies which it does not. Currently the demos section is pretty bare mostly because the JavaScript port still has a lot of bugs and missing features. It is moving in leaps and bounds though and we are pretty confident that we will have all the major demos up in the demo section within a short while. However, if you are familiar with the existing demos checking out their JavaScript counterpart (and the desktop builds as well) will show you what we can accomplish with these ports. ...

Codename One 3.0 Now Live & Special Offer!
We are thrilled to announce the immediate availability of Codename One 3.0! To celebrate this release we are giving away a $100 rebate discount for annual pro subscriptions and $300 rebate discount for annual enterprise subscriptions. All you need to do to get this rebate is signup for an annual subscription and the appropriate sum will be refunded within 24 hours thru PayPal. This offer is valid before June 1st 2015. You can check out the press release and full announcement here. ...

Codename One in the Browser
We are very excited to announce the alpha release of the Codename One Javascript port. This brings us one step closer to the coveted write once run anywhere ideal. Starting with Codename One version 3.0, you will be able to deploy your projects as Javascript applications that run directly in the browser. The process is simple: Select the “JavaScript” build target from the right click menu. Log into the Codename One build server. ...

New Developer Guide
We are rebuilding the developer guide using JBake and asciidoc which means the guide would be better integrated into the website thus providing more accessible hyperlinkable information. This is already making its way into the site and into the PDF so we’d appreciate feedback. This is still work in progress where we integrate the information that we conveyed in the blog over the past 18 months into the guide, this is a lengthy process since the information needs to be edited into a more formal structure and updated with changes. Hopefully we will complete all this work by the release of 3.0 which is approaching fast. Archived Comments This post was automatically migrated from the legacy Codename One blog. The original comments are preserved below for historical context. New discussion happens in the Discussion section. ...

Server Initiated Push
Sending a push notification from the simulator or mobile device is pretty trivial when we use the Push class. However, sending push messages from the server seems to be a bit more complicated for most developers since its not as well documented. The main point of complexity is that we didn’t provide any samples of server push code and from the fact that the server expects arguments as POST. ...

Accelerometer & Code Freeze
Devices have sensors such as accelerometer, GPS and up until now our support for them was relatively basic. Chen recently introduced a cn1lib that includes support for various types of sensors on the device. Its really simple to use: SensorsManager sensor = SensorsManager.getSenorsManager(SensorsManager.TYPE_ACCELEROMETER); if (sensor != null) { sensor.registerListener(new SensorListener() { public void onSensorChanged(long timeStamp, float x, float y, float z) { //do your stuff here... } }); } Check it out if you need access to such features. ...

HTML Hierarchy, Release Plan & TeaVM
When Codename One packages applications into native apps we hide a lot of details to make the process simpler. One of the things we had an issue with is getResource/getResourceAsStream both of which are problematic since they support hierarchies and a concept of package relativity. That’s a concept that is problematic in iOS, generally everything about file access within the bundle in iOS is a bit problematic to accomplish in a cross platform way because Apple tries so hard to “simplify” and ends up creating fragmentation for us. ...

Validation, RegEx & Masking
Up until recently we had to handcode validation logic into every form, this becomes tedious as we work thru larger applications. Some developers built their own generic logic, which leads to obvious duplication of effort. In the interest of keeping everything together we decided to release a standardized validation framework that allows us to define constraints on a set of components, mark invalid entries and disable submission buttons. ...

GC Crashes & Bugs
As part of tracking a bug in iOS media playback Steve hit upon some code that recreated the OpenGL framebuffer pretty much all the time. This was there to allow device rotation to work, but was implemented incorrectly… After this fix animations and UI is much smoother on iOS, if you notice any potential issues let us know. In other news we just fixed two big GC issues in the new VM. The first was a rather complex edge case with GC firing up during native code where more than one allocation was made during the second (or later) allocations (yes edge case). Since objects allocated in native code still don’t have hard Java references the GC can’t “see” those references and thus wiped them. The solution was pretty simple, we now toggle a flag that essentially blocks GC from happening while we are in such a native method… ...