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