One of the main reasons for the thread API I discussed yesterday is a new threadsafe
Database API. This new API allows you to wrap your `Database` instance with a thread that will hide all access to the database and implicitly make it threadsafe by serializing all requests to a single database thread.
Working with threads is usually ranked as one of the least intuitive and painful tasks in programming. This is such an error prone task that some platforms/languages took the route of avoiding threads entirely. I needed to convert some code to work on a separate thread but I still wanted the ability to communicate and transfer data from that thread.Read More
One of the frustrating parts in Codename One is builds failing in the cloud, the expectation is that a build that passes locally would pass in the cloud and that is something we strive to have at all times. One of the more commonfailures for new developers is due to refactoring of the main class or changing the signatures of the methods e.g. adding a throws clause to `start()`.Read More
We had almost everything ready for the release of the kitchen sink demo this week until one of our fixes broke the build and we couldn't get everything out in time. It's disappointing but this means one more week to refine the demo.Read More
One of the first Codename One performance tips is: "Don't use gradients". We already wrote about improved performance to gradients in the past but that covered linear gradients and didn't cover radials on iOS.Read More
Starting with the new version of the NetBeans plugin we will have the new settings/preferences UI which we introduced in the IntelliJ/IDEA plugin. Currently this will be in addition to the main preferences but as we move forward we will only add features to the new settings UI.Read More
With the latest version of the Android port we fixed a long running bug in gradient drawing on Android. Gradients should now work correctly and will also be performant potentially even faster than images on Android. Our standing recommendation is to avoid gradients as they pose a memory/performance penalty on most platforms and so this change raises the question of using gradients back into the forefront.Read More
As part of our continuing effort to squash bugs for the 3.4 release date we hit two major issues, the first of which is a long time RFE to fix PDF viewing on iOS and Android to work consistently. This also applies to any file opening in iOS/Android which should now be trivial with the
Display.execute method. Just use that method on any file within your home directory in
FileSystemStorage and it should launch the native app to view that file.
As part of the bug fixes for the 3.4 release we fixed issue 1725 which was surprisingly difficult to fix... As part of that fix we also added a new method to
TextArea by the name of
setActAsLabel which we now implicitly call in the
We are trying to improve the visibility of Codename One within search engines and as part of that we think we can also help you guys improve your visibility. When you submit your apps to the app gallery we provide dofollow links to your website/app store listings. We'd appreciate if you place dofollow links back to https://www.codenameone.com/ which you can place in a very hidden/unobtrusive way. This helps us increase our page rank and as a result will improve your page rank as we link back to you.Read More
We've been working feverishly to get Codename One 3.3 out of the door next week. Tomorrow morning we will finally have the codefreeze branch for 3.3 and we'll be able to focus on getting the docs/release in order.
The release should be on the 27th of the month and we should ideally get the plugins out of the door within the next couple of days.
Following with the feedback on the recent survey we spent a lot of time debating how we can improve the general process of documentation and ideally have the community more involved. So one of the first things we did is place our entire developer guide directly into the Codename One Wiki!
This allows any one of you without any special permissions (just a standard github account) to edit the wiki directly. No pull request or anything like that required. The syntax is based on asciidoc which is reasonably intuitive so if you see something wrong/missing etc. just edit it directly, we review all changes after the fact so if you get something wrong we will fix it!
Historically, we didn't use Androids profiling tools often. They were pretty awful and the only tools that we really used extensively were the on-device GPU profiling tools which were reasonably good. In recent years Android's native story improved by leaps and bounds with the introduction of Android Studio and 3rd party tools developing native Android apps has improved a lot. But the CPU profiling tools are still stuck in the stone age and this is in stark contrast to the iOS tooling.Read More
Steve has implemented one of our long time RFE's: Async editing in Android. This effectively means that the Android keyboard will behave as it does in iOS and won't fold/open as you move between text fields. It will also remain open as you scroll the screen and won't resize the UI as it opens!
As you can imagine this is a huge change so it is currently off by default but we will flip the change sometime next week to be the default.
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.Read More
We've been spending a lot of times looking at performance for one of our enterprise customers. As part of the investigation he came up with an interesting and very important find... He found that
hashMap.get("String") was much slower under the new VM than under the old VM. Its these sort of "simple" finds that help narrow down bigger issues in performance that might impact a lot of things in Codename One, since HashMap is so ubiquitous the implications of improving it can be huge.
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.