Monday, December 30, 2013

Upcoming Features

December has been pretty busy with the release of 2.0 but January will probably be MUCH busier since we have a major backlog of features requested by enterprise and pro users. We are already well under way with quite a few interesting features but most of them won't be landing for the next couple of weeks since we need the trunk to remain stable for now.

Before I get started, if you are interested in Socket support for Codename One and native interface's you should check out the work Steve Hannah did on a socket library for Codname One. Its also a great reference implementation on how one would write a native library implementation!


read more...

Tuesday, December 24, 2013

With 25m Device Installs, Mobile Development Platform Codename One Announces Version 2.0

Tel Aviv, Israel - Mobile development platform Codename One is announcing the release of its 2.0 version on Wednesday, December 25th. In the 7 months since the May release of 1.1 Codename One has reached profitability, quadrupled its paying subscriber base and was downloaded by 500,000 developers.

Codename One is a one of a kind solution that allows Java developers to build native applications that work on all mobile devices seamlessly. It combines an open source client architecture that integrates seamlessly with all major Java development environments: Eclipse, NetBeans and IntelliJ IDEA. To leverageits one of kind cloud build system. This unique architecture enables Java developers to build iPhone applications without owning a Mac or Windows Phone applications without a Windows 8 machine.

read more...

Monday, December 23, 2013

Release Notes For Codename One 2.0

We will release the full Codename One 2.0 in a couple of days in the meantime here are the release notes covering the changes for this version.

Highlights Of This Release
  • Support for IntelliJ IDEA
  • Support for Google Play Ads on iOS/Android
  • Support for 3rd party libraries using the cn1lib format
  • Major improvements to the Windows Phone 8 port making it far more reliable
  • Fine tuned performance on iOS optimized garbage collector behavior
  • Extensive code migration to use Java 5 features and collections, generified some core interfaces

    read more... 

Wednesday, December 18, 2013

Deeper In The Renderer

When Chen initially drew up the proof of concept for LWUIT he copied the concept of list renderers from Swing, this was one of the most hotly debated issues between us. Whether we should aim for familiarity for Swing users or simplify what has always been an API that novices wrestle with. We eventually went with the familiarity approach, a decision we both agree today was short sighted.

Unfortunately changing the renderer API isn't practical at this stage but we simplified a lot thanks to the GenericListCellRenderer which powers GUI builder list renderers. We simplified this further with the MultiList component which has a default renderer that's pretty powerful to begin with.

read more...

Monday, December 16, 2013

Codename One LIVE Updated & Android Changes

We finally got around to updating Codename One LIVE! and in the process also added a How Do I? video guiding you thru the process of using it.

If you didn't use Codename One LIVE! in the past its a really cool tool that allows you to instantly preview the design you build within the GUI builder right on the device. This works seamlessly for all devices although for iOS its difficult to get an app like that thru itunes and it requires a jailbroken device (unlike regular Codename One apps). 

read more...

Wednesday, December 11, 2013

New HTML Developer Guide & How Do I

We have a couple of new "How Do I" videos covering versioning and crash protection. The code freeze has been in full effect this week and no new features are coming in (although some bugs were squashed), we plan to make a second release candidate which will include some critical bug fixes for 2.0.

We now have a new HTML based developer guide and as usual a downloadable PDF, the HTML guide was generated using pdftohtml.net which did a pretty decent job except for our logo. We now removed the scribd document and are only maintaining the guide here.

read more...

Monday, December 9, 2013

New How DO I, IDEA Launch & Expanded Developer Guide

If you haven't checked the How Do I? section recently check it out now. Its completely redone with a filter tool and every video now has the ability to accept comments right below it which you can use to give out tips to other community members about the usage of a specific feature. There is also a new video covering the include sources feature and how to debug a Codename One iOS application on xcode with the native device/simulator.

read more...

Wednesday, December 4, 2013

Adding Google Play Ad's

We are officially code frozen so only critical bug fixes should be resolved until the actual release. The very last feature to make it in is support for Google Play Ads on iOS/Android. We currently only work with the Admob SDK as we move along we might add additional options.

To enable mobile ads just create an ad unit in Admob's website, you should end up with the key similar to this: ca-app-pub-8610616152754010/3413603324

read more...

Monday, December 2, 2013

Using The New Facebook API

We recently introduced a new Facebook API to allow native integration since Facebook has stated their intention to no longer accept OAuth logins from applications. This is very much work in progress so some things will change as we move along especially related to elevated permissions for posting.

If you just want something in the form of a "share button" we suggest you refer to the builtin share button which uses native sharing on both iOS and Android.

read more...

Wednesday, November 27, 2013

O'Reilly Blog, Sharing & Performance

I've just written a blog post for O'Reilly media and we'd very much appreciate it if you check it out, share it (ideally via the social media buttons on it) and spread it to your friends/colleagues. Please take the 5 minutes to do this as this would be very helpful for us. Thank you.

The ShareButton component in Codename One is one the most important pieces in making your app a viral success. In Android it fires the native share intent where you can select to distribute the app's message via a very wide selection of options. In other platforms you get a pretty narrow, fixed selection of options that is very cross platform since it uses Codename One's builtin capabilities.

read more...

Monday, November 25, 2013

Fast Push Communication Using PubNub

This came out 5 months  ago but the guy from PubNub didn't update us on the status so we just didn't notice this until now. That's probably a good sign of us being too busy. There is now official PubNub integration for Codename One, which means you can get push like fast 2 way communications between devices without writing too much code.

How does it work?
PubNub has CDN like operations around the world, this means they can keep a high performance channel to your devices and send peer to peer or server/peer messages REALLY fast. 

read more...

Monday, November 18, 2013

Preparing For 2.0

We are now finalizing the features for Codename One 2.0. Yes we are skipping the 1.2 revision and going up to the 2nd generation which we feel is warranted given the amount of features added since the May release of 1.1.
We will make the release in December which we will probably spend in code freeze so you won't see new features from us during that month that are not bug fixes or completely separate features (e.g. IDEA plugin).

read more...

Wednesday, November 13, 2013

LTS Blog Post And Updates

The guys at LTS just published a post I wrote in their blog, if you are reading this thinking "I'd like to read another 5,000 words from that guy" then head to their blog.

Speaking of promoting other people I hope you filled the developer economics survey, its really helpful for us and time is running out (they are closing the survey soon). They added additional language options which you can use that might make the process faster.


read more...

Monday, November 11, 2013

Spinning Natively And Windows Bug

Shai Ifrach spent the weekend fixing one of the harder Windows Phone issues we had, sometimes on some Windows Phone devices the UI would start with a black screen but never when connected to the debugger! Ugh.
Turns out this is a race condition related to using the wrong lifecycle callback (which is used by all of MS's demos)!
Kudos to him because I spent just about ages trying to tackle that issue unsuccessfully, this should now allow us to move forward with some of the additional issues on Windows Phone and hopefully bring the port up to the level of the other ports we have or at least a little bit closer.

read more...

Wednesday, November 6, 2013

Video Of LTS Talk

The video of the LTS talk is now live, unfortunately during the talk we had audio issues due to the large number of viewers and had to turn off the camera. The picture that remains for the rest of the slides is a freeze frame of me frowning over not turning the camera sooner.

read more...

Monday, November 4, 2013

Surprises And Changes



We have constant Google alerts setup fro various Codename One related keywords and the other day we got a lovely surprise in the form of this great presentation from Mateja Opacic who to my knowledge never contacted us or discussed this with us. Apparently he made this presentation at the Coding Serbia Conference, which is really cool!
He has a great presentation & demo.

read more...

Thursday, October 31, 2013

New Servers And Internationalization

Its been a busy week with the LTS session, we barely had time to do much. However, we did do quite a lot of work during this week including some improvements for l10n and new server deployments.

Those of you who followed the l10n video in the How Do I? section or our Udemy course should be familiar with the really cool seamless localization support available in Codename One. However, to translate the application we usually need to send the files to a professional translator...

read more...

Monday, October 28, 2013

Seven

Its been a long time coming, the main delay in getting iOS 7 support into your hands has been with the need to upgrade all the servers. Apple seems to require OS upgrades as well when it updates xcode so we had to go one by one and update everything.
This is now all in place and you can start building apps that take advantage of iOS 7 functionality and are built using xcode 5.

When you send an app to the build server without doing anything it will still be built with the existing iOS 6 theme and xcode 4.5 and will act like it has for the past year or so. However, we now provide you with the ability to use xcode 5 for building and indicate a theme mode.
There are 4 theme modes:

read more...

Wednesday, October 23, 2013

Please Help Us By Taking This Survey

We would very much appreciate it if you take the new Developer Economics 10-minute survey you can also win prizes as a result! VisionMobile has launched a new Developer Economics survey. If you're an app developer, take the survey to have your say and win prizes, including an iPhone, a Galaxy S4, two Nokia Lumia 920 handsets and some cool gadgets.

Also - respondents who complete the survey and opt-in to VisionMobile's panel can access the Developer Benchmarks, a visualised scorecard of how they compare to other developers in their country or region, across platforms used, revenue models, app categories and more.
The survey results will be available for free download on January 2014.

This is really important to us, it allows us to improve our positioning and awareness within the industry. Regardless of your subscription level it would be very helpful for us if you take those 10 minutes and click the link.

Monday, October 14, 2013

Property Of The Client

One of the really useful features in Codename One that many developers are just unaware of is the client properties trick. Every component in Codename One has a Map (Hashtable) associated with it containing arbitrary objects you can store in association with that component.

To use this feature you can just invoke putClientProperty(propertyName, value); then getClientProperty(propertyName) to extract the property.

read more...

Thursday, October 10, 2013

You are cordially invited

 
This has been a busy week, I am gearing up for my LTS lecture on the 30th. Its free for everyone and I hope you all tune in to watch it!
The subject matter should be interesting to all Java developers and its essentially how you build a cross platform solution implementation, you don't need any knowledge of Codename One since I won't be discussing it much. Its about device issues and how these work with the JVM. So feel free to distribute this to your friends who aren't necessarily Codename one developers.

read more...

Monday, October 7, 2013

iOS Code Signing Fail Checklist

This is one of the biggest FAQ's we get on the mailing list: I followed the iOS signing tutorial or video tutorial and still didn't succeed in signing (notice that you need to actually read the links above, the certificate you get from the apple website is not enough!).

How do I debug something like this?

Notice that some of these signing failures will sometimes manifest themselves during build and sometimes will manifest during the install of the application.

read more...

Wednesday, September 18, 2013

On The Side, Up On Top

A lot has happened with the side menu bar (the Hamburger Menu) since we initially launched it. We now support a lot of new features seamlessly such as swiping the sidemenu in/out and various other capabilities. The other day we added support for side menus on the right and top as well as multiple buttons on the side menu title bar.

read more...

Monday, September 16, 2013

JavaZone Trip Report

I wrote this post while I was still in Oslo, the thing about a trip report is you want to write it as soon as possible when things are fresh in your mind.
First off, JavaZone is indeed the most fun conference I've been to (to be fair, haven't been to comicon), you get there are 8:00AM and a bit later a cover band goes on stage in the middle of the Pavilion show floor and just blasts a short set. I filmed it a bit (sorry for the bad quality the galaxy nexus is many things but it is not a good camera). To understand the meaning of the picture you see here scroll to the bottom for some personal notes...

read more...

Sunday, September 8, 2013

Faster iOS Runtime - JavaZone Edition

Before we get into the subject of today's post a small public service announcement: we recently added the ability to create annual pro subscriptions. This provides a 10% discount over our standard pro subscription rates.

I'm writing this while preparing for my JavaZone flight. What you see in the picture on the right is the typical content of my backpack which I carry with me everywhere in case there is a problem I need to debug, this is somewhat of a visual tutorial of "what it takes" to be a mobile developer today. I took this picture for the JavaZone presentation I'm making and I think it illustrates well why Codename One exists (BTW it is missing some of my testing devices such as the iPad 2, the Android tablets and a few J2ME phones).

read more...

Thursday, September 5, 2013

Attachments, Network Speed and More

Our email api only supported a single attachment until now. We just added an api that allows for multiple attachments which we will add in the next update. Notice that multiple attachments will only work on iOS/Android at the moment.

Also in this update you would find a fix for the Twitter service (see the TwitterRESTService class) and some other capabilities such as support for network performance issues.

read more...

Monday, September 2, 2013

Till The End Of The Form

We've had pull to refresh for quite some time which is a really nice feature useful for pulling new updates. We also always had infinite lists using a smart list model approach, however up until now we didn't have a standard implementation of an infinite container with arbitrary components.

In some of the newer web UI's such as Tumblr and Twitter the data is fetched dynamically when you reach a fixed location in the form, this is a simpler approach than the one demonstrated by the list model but in some regards its more practical. A user can't just start jumping around and fetching the entire list, this works better with most REST API's and is pretty powerful on its own.

read more....

Wednesday, August 28, 2013

Completion, iOS 7 Update And The 20M Mark

Exciting news this week, Chen FINALLY did what we procrastinated on for so long and wrote an auto-complete text field!

This is really easy to incorporate into your code, just replace your usage of TextField with AutoCompleteTextField and define the data that the auto complete should work from. There is a default implementation that accepts a String array or a ListModel for completion strings, this can work well for a "small" set of thousands (or tens of thousands) of entries.

read more...

Monday, August 26, 2013

Folk Dancing And General Updates

 Who would have thought Hungarian folk dance would be so entertaining!
Can't. stop. watching....

Its been a busy week mostly spent on updating the build server code so its iOS 7 ready, during that time we also managed to get some other things done...

These are some of the highlights:  You may recall the ImageViewer class that I mentioned a while back, it will now be a part of the designer and has some small improvements to its event handling as well as keyboard handling.

read more...

Tuesday, August 20, 2013

Codename One Article In SDJ

Remember the Poker app we teased a couple of weeks ago?
Now you can read all about it in SDJ, the entire article is in the downloadable PDF (please buy the magazine!).

We'll try to post the full source code into SVN and get into more details about it here. If you have any questions/comments related to the article feel free to ask in the comments section right here.

Monday, August 19, 2013

It's In The Bag

GridBag that is. So GridBagLayout is one of the most notorious of the layout managers in Java in fact for many developers it symbolizes the failure of the layout manager concept. That is the main reason why we never added it.


Last week I had a very interesting conversation with a very prominent Swing developer and he asked me whether we had gridbag support. I answered that we do not and repeated the regular "no one likes it" line, turns out he does like it and has a lot of Swing code that uses GridBag!

read more...

Wednesday, August 14, 2013

Teamwork (and other things)

While Java rocks for teamwork because of its strict and streamlined heuristics, our resource files are less ideal. However we are changing that in the next update to Codename One!

The reason we chose to put everything into a binary resource file should be obvious: small size, portability. These are two critical features we had in mind when we designed the resource file format, we also wanted it to be really simple so we can e-mail it to our designer and so people could use it without an IDE (which back in 2006 was far more common). We initially thought about creating an XML file format which a special tool will convert into the res file format (and we had some prior work on the matter such as the XML ant tasks) but these proved to be cumbersome to maintain.

read more...

Monday, August 12, 2013

Use The Source

To me the biggest advantage in Codename One over pretty much any other mobile solution is that its realistically open source. Realistically means that even an average developer can dig into 90% of the Codename One source code, change it and contribute to it!

However, sadly most developers don't even try and most of those who do focus only on the aspect of building for devices rather than the advantage of much easier debugging. By incorporating the Codename One sources you can instantly see the effect of changes we made in SVN without waiting for a plugin update. You can, debug into Codename One code which can help you pinpoint issues in your own code and also in resolving issues in ours!

read more...

Wednesday, August 7, 2013

In A Pinch

Codename One has supported multi-touch and effectively pinch to zoom events from the very first release. However, it wasn't intuitive to write code that would handle pinch to zoom. We just committed new pinch callback events to component which effectively allows you to zoom in/out with gestures.

read more...

Monday, August 5, 2013

You Can Bet On It


Recently the guys from Software Developer Journal contacted us about writing a mobile gaming article, since quite a few Codename One developers use it to write games we decided to accept the offer and I wrote an article titled: "Writing casual games In Java for mobile devices". In this article we create a simple poker game mockup that is fully functional (although it doesn't include betting, AI or networking), but you can drag the cards to have them replaced and click the deck to deal new cards.

read more...

Monday, July 29, 2013

Pushing It

We got a request from one of our pro-subscribers to support push notification on Blackberry devices. Normally we just implement the feature pro-developers ask for. However, in this case we were cautious... Building anything for/on top of a RIM device is often an exercise in futility.

The gist of it though is that we were able to get it working despite the huge hassles. The main issue here isn't the lack of documentation, its the over abundance of irrelevant, conflicting and misleading documents about a multitude of separate features of push related functionality on RIM devices.

read more...

Thursday, July 25, 2013

Spanning, Caching, Native Fonts and more

When you have so many features as Codename One has things sometimes slip, a feature gets lost and even the guys who created it forget it was there. There are two such stories in this post one dates back to the very start of Codename One....
But first lets start with the other one. A month or so ago we added a component called SpanButton which has been requested by developers for quite a while. This is effectively a button that can break lines like a text area, its really a Lead Component internally (but that's another post).
However, someone (me) forgot to make the class public before committing and we just didn't notice that.

read more...

Monday, July 22, 2013

Jaring And Libraries

Support for JAR files in Codename One has been a source of confusion despite my previous post on the matter so its probably a good idea to revisit this subject again and clarify all the details.  The first source of confusion is changing the classpath. You should NEVER change the classpath or add an external JAR via the NetBeans/Eclipse classpath UI. The reasoning here is very simple, these IDE's don't package the JAR's into the final executable and even if they did these JAR's would probably use features unavailable or inappropriate for the device (e.g. java.io.File etc.).

read more...

Wednesday, July 17, 2013

Crashing

In an ideal world your app would work perfectly on the device just as it does on the simulator, however that ideal world never exists under any development environment. Performance is different and unfortunately you occasionally get crashes on the device that you don't get on a simulator. The reasons for this are many and varied, usually a crash means we did something wrong, but sometimes it might mean an exception was thrown and never caught or an API was misused.

read more...

Monday, July 15, 2013

Why Mobile Web Is Slow?

Over the weekend quite a few people wrote to me about a well researched article written by Drew Crawford where he gives some insights about why the mobile web/JavaScript is slow and will not (for the foreseeable future) compete with native code. My opinion of the article is mixed, it is well written and very well researched, I also agree with a few of the points but I think that despite getting some of the conclusions wrong I think his reasoning is inaccurate.

read more...

Wednesday, July 10, 2013

MoPub Ad Support

For a long time we've been looking for a proper partner on banner ads and could only find mediocre networks or worse. Unfortunately it seems the field of proper advertising on device is still problematic and we just couldn't find anyone with an offering that will work properly across the globe/devices.

So we picked the next best thing, we integrated MoPub support for Android/iOS only (for true cross platform our Inneractive support is still in place). MoPub isn't an advertizing network, its an ad exchange. So effectively when you place a banner ad via MoPub you can get an ad from AdMob, iAd or any one of a relatively large list of partner networks.

read more...

Monday, July 8, 2013

Handling The Exception

Handling errors or exceptions in a deployed product is pretty difficult, most users would just throw away your app and some would give it a negative rating without providing you with the opportunity to actually fix the bug that might have happened.

Google improved on this a bit by allowing users to submit stack traces for failures on Android devices but this requires the users approval for sending personal data which you might not need if you only want to receive the stack trace and maybe some basic application state (without violating user privacy).

read more...

Wednesday, July 3, 2013

The Move To Java 5 And New Cloud E-Mail Support

We started moving the usages of Vector and Hashtable to use Map/Collection/HashMap & ArrayList. This follows our release of the full source code for our modified version of retroweaver and the Java packages that go with it. Recap: we had to change retroweaver which was designed to allow Java 5 code to run on Java 2 in order to get it to work with CLDC which is missing MANY features.

read more...

Sunday, June 30, 2013

Big Batch Of Features

We've been so busy this past month that we just forgot mentioning many of the features that went into Codename One in June and
there are MANY small features that just didn't get a blog post or even a mention!

We just open sourced a major piece of our backend code, the changes to retroweaver and library code that allow us to compile Java SE 5 code to J2ME/RIM. With this change in place we will start using Java 5 features throughout the code but mostly transition towards using ArrayList/HashMap and the base collection interfaces rather than Vector/Hashtable.
read more...

Thursday, June 27, 2013

Longstanding Issue Of Back Button In BiDi/RTL

We've had a long standing annoyance with Codename One's RTL (Right To Left languages, e.g. Arabic/Hebrew etc.) where the back button was still pointing in the wrong direction on iOS.
This was REALLY annoying to such a great extent that up until recently we recommended that people don't use RTL on iOS devices.

read more...

Monday, June 24, 2013

Hands-on With The Blackberry Tools On The Z10

Note: skip to the bottom for some instructions on working with the BB Z10.

Lately we've been asked by one of our pro customers to fix some issues which occurred only on the z10 device. I thought this would be an easy task: just grab the tools from the blackberry site and then use them to debug the issue. I was quite wrong...  Apparently the emulator can only run in a virtualization environment.

read more...

Monday, June 17, 2013

GZip Support

We now have new support for GZipInputStream and GZipOutputStream thanks to the great work done by the guys in the JZLib project, we ported their work into the project class hierarchy and added a GZConnectionRequest which will automatically unzip an HTTP response if it is indeed gzipped.

read more...

Wednesday, June 12, 2013

iOS 7 Support

Apple just announced iOS 7 support the other day and it includes quite a few UI changes. We are already working full speed at incorporating support for iOS 7 before the general availability of the OS and have already released an initial skin through the OTA download feature (it will only work properly with the next plugin update).

read more...

Monday, June 10, 2013

Walk-thru Tutorial


Codename One Maker is a pretty elaborate app, there is only so far we can go with simplifying the app itself.

So we added a tutorial mode which is common in mobile/web apps, to walk the user through the process of creating a simple application and using the GUI builder (we also added a Udemy course but I digress). This feature is probably useful for almost every app out there, so here is how you can achieve that with Codename One...

read more...

Thursday, June 6, 2013

Bouncy Castle Crypto API

We've got many requests in the past year for a cryptography API, initially we thought about adding something like this to the core but it seems somewhat niche so we decided to wrap up this great open source project and re-package it as a CodenameOne lib.The project is supported on all CodenameOne platforms right out of the box without any changes.

read more...

Monday, June 3, 2013

When A Dialog Isn't A Dialog

One of the things we've been working on with Maker is getting the new GUI builder to support hierarchies/layouts which should be landing tomorrow or so. When we initially built the GUI builder within the Codename One designer we made many mistakes but one of the big ones was with layouts, it takes too long to see how a layout affects something (you need to physically accept a dialog/rinse repeat) so people just don't experiment enough with the options.

read more...

Wednesday, May 29, 2013

Maker: On Device Drag & Drop GUI Builder + External 3rd Party Plugins!


The PC isn't going away tomorrow but I think we took a major step in reducing the need for it when building some applications in the upcoming version of Maker. We just launched a very preliminary preview of our new Drag & Drop form designer for Maker. This is pretty rough early on, but having built quite a few GUI builders I can tell you that its 90% there! You can drag elements into place, yes they are all in a vertical layout (BoxLayout Y) and there is no container hierarchy (yet) but the infrastructure is there and its already looking better than our current GUI builder looked at that stage!

read more...

Sunday, May 26, 2013

Codename One Maker Is Now Live On Google Play

We just released an initial preview of Codename One Maker into Google Play to start soliciting feedback on what we got wrong and what we need to improve. Let us know what you think and how we can improve it in the future.

We already intend to produce some of the following:

read more...

Wednesday, May 22, 2013

Introducing Codename One Maker



We are about to release a brand new product: Maker. Codename One Maker is an App that allows non-developers to build native applications directly from their mobile phone or tablet by using the Codename One backend.

read more...

Monday, May 13, 2013

Drop It - Introducing Dropbox Integration

We are working on something exciting, more on that next week (hopefully). One of the things we needed was a way to access files on a device, e.g. images, etc. however this is a painful and fragmented subject.

Most of my files are still on my laptop and not on my tablet or phone and moving them back and forth isn't convenient... Luckily we have Dropbox, this neat tool has really helped us collaborate as a startup and has made many painful things remarkably easy.

read more...

Wednesday, May 1, 2013

Cloud Object Viewer

Working with the Cloud Object API can sometimes be difficult. The data isn't tabular and understanding the concepts such as indexes and scopes for such objects is pretty hard.

To help alleviate this difficulty Chen built a tool right into the Codename One simulator that allows you to query the cloud storage for the current application and helps you review some of the complexities involved.

read more...

Monday, April 29, 2013

Pingjam: A New Way To Make Money On Ads

We have many interesting ways for you to make money using Codename One and pingjam is one of the most innovative ways we ran into. Pingjam ads are placed within the dialer window based on the number you are dialing to, e.g. you dial to purchase a pizza you might get an ad offering a discount for purchasing over the web!

read more...

Wednesday, April 24, 2013

J2ME, Feature Phones & Nokia Devices

Monday, April 22, 2013

Turn It On (Or Off)

We just added a new On/Off switch to Codename One that should allow you to use this component which is very popular on iOS (and gaining some popularity on Android), this is a rather elaborate component because of its very unique design on iOS but we were able to accommodate most of the small behaviors of the component into our version and it seamlessly adapts between the Android style and the iOS style.

read more...

Thursday, April 18, 2013

OTA Device Skin Downloads

Chen has recently added support for a new OTA (Over The Air) skin download feature which allows us to give you more device skins while maintaining a relatively small distribution size, in fact we might shrink the distribution by removing some of the builtin skins into the new OTA download option. Most of the work on the Skins themselves was contributed by Eric Coolman who did a lot of work on cutting these up and assembling them properly.

read more...

Tuesday, April 16, 2013

Which Subscription Level Should I Choose?

From the many emails and discussions we have with developers it seems that there is a great deal of confusion regarding the differences between the 4 levels of subscription that Codename One is offering. I would like to explain the difference more succinctly by covering some of the cases and benefits we reached with various level of subscribers. There are generally 4 levels of subscription: Free, Basic, Pro & Enterprise. (note: there is also a corporate tailored license which is something completely different).

read more...

Monday, April 8, 2013

Cutting PSD Files

This post is inspired by a great post written by Tope, covering the slicing of a PSD image to produce small PNG images which you can later on use as image borders, backgrounds, icons etc. Tope's technique is pretty simple and works rather well but I'd like to offer another technique as well as a better way to detect the proper layer you with to cut.

read more...

Wednesday, April 3, 2013

Windows Phone 8 And The State Of 7


A preliminary Windows Phone 8 build has been available on our servers for the past couple of days. We differentiate between a Windows Phone 7 and 8 version by a build argument that indicates the version (win.ver=8) this will be exposed by the GUI in the next update of the plugin. But now I would like to discuss the architecture and logic behind this port which will help you understand how to optimize the port and maybe even help us with the actual port.
The Windows Phone 7 and 8 ports are both based on the XMLVM translation to C# code, we picked this approach because all other automated approaches proved to be duds. iKVM which seems like the most promising option, isn't supported on mobile so that only left the XMLVM option.

read more...

Tuesday, March 26, 2013

Combining SalesForce and Codename One

This is a guest post by Bertrand Cirot, based on an original blog post that appeared here. Bertrand works as an SFDC, Flex and Java/J2EE developer in Switzerland. Closely interested in mobile device solutions, he writes on Tuto-CodenameOne.ch which proposes tutorials for the French-speaking community.

While investigating the possibilities within Codename One, I made a discovery that I would like to share with you via this short article. But first lets discuss SalesForce, it is a CRM platform. Which has an advantage of an open Web Service API enabling it for use with Codename One.

This is an ideal combination that provides simple and effective customer management on all mobile devices.

read more... 

Sunday, March 24, 2013

5 Tips for Gamifying Your Mobile App

This is a guest post by Yaniv Nizan who is the CEO and Co-Founder of The SOOMLA Project, the platform for Creating In-App Purchase Stores for Mobile Games. Yaniv also writes in 4 different blogs including blog.soom.la, speaks in different industry events about gamification and game design and tweets @y_nizan.

Gamification is the practice of using game mechanics in a different context with a goal to engage users
Mobile apps are in fierce competition these days. There are over one million apps available in the different marketplaces and while a user may install a large number of apps on his device. Recent research by Flurry shows that users don’t use many apps for very long and in fact only 25% of the apps survive after 3 months.

read more...

Tuesday, March 19, 2013

Performance Improvements On iOS & Some Other News

The other day one of our pro users sent us an app he is working on (which looks great and will hopefully be submitted to the gallery), he was experiencing major performance degradation on iOS compared to Android. Initially I couldn't find anything wrong with the app so I started debugging and benchmarking the hell out of it.

read more...

Thursday, March 7, 2013

Pull To Refresh & Several New How Do I videos

Chen has been busy adding one of the more addictive features yet to Codename One: pull to refresh. If you are unfamiliar with the Twitter app, this feature essentially means that you pull the UI downwards from the top and an arrow appears indicating that the UI will refresh once you lift your finger. This is now baked into Codename One allowing you instantly add this sort of UI pattern!

read more...

Wednesday, February 27, 2013

Hamburger Sidemenu

The title of this post might be a bit misleading... Hamburger?
The Hambuger sidemenu is the menu style popularized by the Facebook app, its called a Hamburger because of the 3 line icon on the top left resembling a hamburger patty between two buns (get it: its a side menu...)!
read more... 

Wednesday, February 20, 2013

Inspecting Components

First, let me start with an apology for not blogging as frequently. Its been hectic these past few weeks and I could barely find the time to write this! That's generally a "good thing(tm)".

One of my favorite things about working with Codename One is the GUI builder, it solves a lot of the headaches of handcoding/positioning elements into place especially when coupled with the Codename One LIVE! application. However, not all of us use the GUI builder and even when we do we sometimes end up writing code manually.

read more...

Saturday, February 9, 2013

New Preliminary Library Support

We've just launched a new library project type for Codename One, this is very preliminary but we think this is pretty much the final direction we will take with the Codename One library support.

read more...

Monday, January 28, 2013

With 100,000 SDK Downloads, Mobile Development Platform Codename One Comes Out of Beta With 1.0 Launch

Tel Aviv, Israel - Mobile development platform Codename One is announcing the launch of its 1.0 version on Tuesday, January 29. After releasing in beta last June, Codename One – the first software development kit that allows Java developers to create true high performance native mobile applications across multiple mobile operating systems using a single code base – has garnered over 100,000 downloads and emerged as one of the fastest toolkits of its kind, on par with native OS toolkits.

read more...

Sunday, January 27, 2013

This blog has moved

Due to technical issues with our ability to customize the look of blogger we shifted the main blog here. We will still maintain this blog and try to cross post everything to the old blog but from now on we would prefer discussion and interaction on the new blog.

Monday, January 21, 2013

Why Oracle won't issue Java for iOS anytime soon

They say that today all companies are software companies. In less than 5 years all companies will be mobile companies. So why isn't Oracle "getting it", why aren't they on the iPhone, on Android and even Windows Phone?

This OTN thread has been going on for some time now with people constantly chiming in with various uninformed opinions regarding their desire for an official Java for all platforms from Oracle.
This won't happen in the next two years or so, don't delude yourselves.
No we don't have a vested interest here, if Oracle issues Java FX for iOS it will be great for us. We will be able to use their implementation (if it were any good, more on that below) and still provide value.

Read below for more detailed explanation from a former insider as to why this just won't happen.

Chen used to be a Sun employee and I was a Sun contractor for quite a few years, we were there for the Oracle takeover as well. I can't talk too much about what I know from within, its not so much a contractual issue  as a personal moral issue (respect the privacy of the guys paying your bills). However, there is one thing that I think no one will mind me disclosing that explains perfectly well why Oracle removed all sessions about the iPhone from Java One (except for our session which wasn't an Oracle sponsored section).

One of the early feelings we got before the merger completed was  the basic difference between Sun and Oracle and it boiled down to this:
With Sun we used to go to customers/trade shows and show the cool stuff we had that wasn't yet a product. E.g. showing off cool new JavaFX tools that didn't have an ETA yet. This was ingrained in the hacker mentality and core to Sun, why show people the stuff that's available to download?
Don't they know already?

Oracle is the exact opposite, they NEVER show something that isn't a product or won't be a product very soon. This is actually quite clever, people aren't aware of lots of the stuff that's available and if you talk about your pipe dream (which is cool) there is no "action item" to download a try it. You need people's attention focused on what they can buy (obvious why Oracle was profiting while Sun was losing).

So Oracle's removing of the JavaFX on iOS talks from Java One is simply a matter of them not having a concrete product in the pipeline (update: just to clarify, this is an educated guess not a statement of fact).

Now you may ask: Why not?

That's actually a much easier answer and as usual it divides into several different answers:
  1. There is no business there - Oracle released a Java based solution for iOS backend for the ADF team. This is a tool that's only useful if you buy a server license (minimum 20k USD), so there is a clear business here.
    Java is generally an odd duck in Oracle's tools, they just don't build stuff that doesn't make business sense (like Java itself).
  2. This is a consumer product - Oracle is an enterprise company. Yes they are trying to break some of that mold but old habits die hard, they don't really understand the business and they don't really know how to build consumer products.
    Sun also sucked with user facing projects so really this isn't very different (and keep in mind, that Sun never made a Java for iPhone release either despite Apple removing the restrictions WELL before the acquisition).
  3. It will suck - the problem here is Apple. Apple disallows JIT's in its license (self modifying code), mostly for security reasons but probably also to block things like this. That is why you can't ship a custom built webkit with your application (no V8 JavaScript engine for Chrome on iOS which is why it sucks on iOS).
    We get around it by translating the Java bytecode to C and compiling it, this gives us native (or better) performance.
    I don't know about Oracle here, but this sort of architecture would never fly at Sun. Java is a virtual machine with a JIT, that is a religion within Sun and I assume the same is true for the Sun engineers who stayed at Oracle.
  4. It will suck worse -  not only will it be slow because of the VM, it will be slow because of JavaFX (here we can actually help if Oracle chooses to do option 3 well).
    Adobe with its amazing skills in vector graphics programming is finding it remarkably hard to build a high performance vector graphics rendering engine in iOS. They complain that Apple doesn't expose the internal GPU behavior.
    Frankly, I understand Apple here. Documenting the GPU on the level Adobe needs is REALLY hard. Supporting this against potential driver issues and attacks isn't simple, that's why they have Core Animation.
    Java FX can't use Core Animation (just like Adobe can't) and will run into the exact same problems Adobe hit. I have a great deal of respect for the engineers on the Java FX team, they are pretty clever. But that's not good enough.
    We don't run into those pitfalls since we are pretty used to device limitations, we pre-render everything important as raster images (which is what most mobile developers do anyway). This might not have the same "cool" graphics geek sheik, but it actually provides amazing looks because prerendering often looks better. Sure there are compromises about what you can do, but you will find pre-rendered graphics in most of the leading iOS apps despite the availability of vector graphics. Its easier, faster and flexible enough.
So if you are looking for JavaFX on iOS, Android or Windows Phone then sorry. Just won't happen.
We are trying to help, but Java FX is a dead end technology as illustrated by the famous graph at the top of this article. Everyone will be on mobile which will exceed everything WinTel ever was and FX isn't well suited for today's mobile devices. It probably can't be fixed either since it relies on a Scene-Graph approach which just isn't very portable to device specific Scene-Graphs. It would be possible to implement it over OpenGL ES but that has many issues.

Wednesday, January 9, 2013

How Do I???


Answering common question is what a FAQ is usually for, but usually that's just not enough. A common presentation tip is: "Show, don't tell".
Which is why we launched the "How Do I?" section in the Codename One website, this section contains short video tutorials demonstrating how to do small things in Codename One from creating your first Codename One application to monetizing and debugging it (upcoming).
We hope to flesh out this section with more videos as time goes on, feel free to ask for future videos right here.

Sunday, January 6, 2013

Survey Results With Some Comments/Thoughts

Thanks for answering our questions about what you want in Codename One 1.1, your answers were very interesting and your comments are always helpful. Before getting to the actual results I'd like to cover some of the comments made in some of the responses which I think broadcast that we need to communicate what we have better:

A frequent request is for more ad network integration "AdMob, iAd support and more" we are working on those but getting the agreements through and adapting them is difficult. These two specific networks are specifically difficult, Google is very rigid on AdMob and Apple is worse. We are constantly talking with networks about adding support for them (e.g. Zooz and Startapp which were recently integrated), but this is a time consuming slow process.

A comment asked for: "Lists that require less code to implement.". Did you checkout MultiList? Check out the up to date developer guide which covers them, they are pretty lean and also very easy to work with in the GUI builder.

One poster answered "Fast rendering on iOS (Slow performance on iPad 1 / iOS 5.5.1)" to which I would like to answer that rendering is pretty fast already. If you feel performance is slow a survey isn't the place to say that, use the discussion forum and read the developer guide tips.
Mutable images are inherently slow on iOS and drawing most graphics primitives isn't as fast, however image drawing etc. should be pretty fast.

One poster asked for "Debugging on real device directly from Eclipse/Netbeans" which we plan to do in the future and actually have all the pieces in place for this. It would just require quite a major effort from us to actually accomplish this so this isn't planned for 1.1.

We got one request for "Proximity Sensor Support", I'm guessing that we would have to implement bluetooth, NFC, sockets, motion sensor and only then proximity if at all. There is just too much ground to cover in these things.

Another commenter asked for "Annotations Support to make compilation metaprogramming". We already support static annotations, dynamic annotations won't be possible on older platforms (which might be fine) but would require some reflection capabilities. Since a mobile application is statically linked runtime annotations might be completely redundant since we know of all classes during compile time, that won't change since we translate bytecode to native.
Most of the functionality used by annotations is useful with dynamic loading, I would be interested to hear use cases though so feel free to submit issues with specific cases you would want to enable.

Lets look at the results and then I'll try to interpret them. Feel free to give your own spin in the comments below.
The first chart represents the primary feature, listed by rank below.

  1. Windows Phone 8 support    32.56%
  2. Library support    20.93%
  3. New layout managers    9.30%
  4. Continuous integration    6.98%
  5. Improved 2D vector graphics    6.98%
  6. Facebook/Google+ side menu    6.98%
  7. Infinite scroll/pull to refresh    4.65%
  8. bluetooth    4.65%
  9. Easy web service wizard    2.33%
  10. Theme customizer/colorization tool    2.33%
  11. Charts API (graphs)    2.33%
Everything below this got 0 percent.

The second chart shows the options when picking one of 3 options:

  1. Windows Phone 8 support    17.22%
  2. Library support    16.56%
  3. Charts API (graphs)    9.27%
  4. Improved 2D vector graphics    7.28%
  5. Infinite scroll/pull to refresh    6.62%
  6. New layout managers    6.62%
  7. Facebook/Google+ side menu    5.96%
  8. Continuous integration    5.30%
  9. Theme customizer/colorization tool    5.30%
  10. Automatic device testing    4.64%
  11. Matisse like layout in the GUI builder    3.97%
  12. Easy web service wizard    3.31%
  13. Support Amazon purchase & push API's    2.65%
  14. IntelliJ Idea support    2.65%
  15. Auto complete wizard    1.99%
  16. bluetooth    0.66%

My interpretation of the data is this:
  • People want Windows Phone 8 support. We are working on getting it into 1.1.
  • Library support, again a major requested feature although I'm not sure people understand what it means. This doesn't mean you could take any arbitrary JAR off the internet. We already announced this feature for 1.1 so we are good here.
  • New layout manager made a surprise showing at the top... I think this generally says people find layout managers difficult and hope we would have a better option. But its very likely a new layout manager will suffer from different set of problems from the current ones. I'd be happy if people who voted for this can post examples of what they would want in the comments.
  • It surprised me that no one voted for the Matisse like layout manager in the GUI builder. I'm guessing people didn't understand that this meant placing components in arbitrary locations and having it "just work" (sort of).
  • Continuous integration made a great showing, I really want it as part of 1.1.
  • I'm guessing most people who voted for improved vector graphics assume this is about performance or maybe SVG support. If I'm wrong about this feel free to correct me in the comments below. I'd like to start some of the work for this and would especially love to add features such as perspective transform.
  • It surprised me how low bluetooth scored, we will probably not have it for 1.1 either unless we get a code contribution there.
  • Charts have a really high secondary option position and a really low 1st priority position. I think its an important feature but I'm still undecided since its a VERY complex feature to properly integrate.