Sunday, July 1, 2012

Major Changes In Codename One

We're launching a few major features into Codename One over the next couple of days that would make a huge difference overall to our product/architecture and your experience: Server arguments & Java language processor.

We will start with the first. Up until now Codename One limited the syntax and functionality of the Java VM to the CLDC level of Java support in order to support RIM and J2ME devices. Starting very soon this will no longer be the case! We have added very extensive Java 5 feature support including generics, enums, annotations etc. newer Codename One applications will start making use of these features as well.

These features are implemented by effectively stripping the syntax sugar from the application, this means you will still need to limit yourself to a small subset of Java 5 features but that subset is growing and will maintain some backwards compatibility. There will be no reflection and some painful omissions such as the lack of the "Number" class are still there, however quite a few things are available.
Keep in mind that NetBeans will still show you a far more extensive set of supported features. We intend to extend the plugin to review the code more closely before sending it to the server for a future release.

The second major change is even bigger, we added the ability to send arguments to the build on the server side and are starting to define the arguments you can send. E.g. when sending an iphone build it was always built as a universal application (both iPhone & iPad support). Starting now, you can add a server argument to indicate that you are interested only in iPhone or iPad versions. The same goes to many similar features.
We now also scan the binary code and fine tune the permissions on the Android platform to match the API's used by the developer. When developing native code on Android you can now insert manifest changes in several locations.

We are really excited about these upcoming changes and how you are too. Here is the current list of arguments, keep up with out developer guide which will include an up to date list of all current arguments:
  • android.min_sdk_version - defaults to "7". Used in the manifest to indicate the android:minSdkVersion property.
  • android.xapplication - defaults to an empty string. Allows developers of native Android code to add text within the application block to define things such as widgets etc.
  • block_server_registration - true/false flag defaults to false. By default Codename One applications register with our server, setting this to true blocks them from sending information to our cloud. We keep this data for statistical purposes and intend to provide additional installation stats in the future.
  • ios.project_type - one of ios, ipad, iphone (defaults to ios). Indicates whether the resulting binary is targeted to the iphone only or ipad only.
  • ios.statusbar_hidden - true/false defaults to false. Hides the iOS status bar if set to true.
  • ios.prerendered_icon - true/false defaults to false. The iOS build process adapts the submitted icon for iOS conventions (adding an overlay) that might not be appropriate on some icons. Setting this to true leaves the icon unchanged (only scaled).
  • ios.application_exits - true/false (defaults to true). Indicates whether the application should exit immediately on home button press. The default is to exit, leaving the application running is untested at the moment.
  • ios.interface_orientation - UIInterfaceOrientationPortrait by default. Indicates the default initial orientation, one of: UIInterfaceOrientationPortrait, UIInterfaceOrientationPortraitUpsideDown, UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight
  • rim.askPermissions - true/false defaults to true. Indicates whether the user is prompted for permissions on RIM devices.

0 comments:

Post a Comment