In the previous template post I introduced a material design inspired theme. This time the theme I chose is simpler "cleaner" but not necessarily easier to integrate. I've had quite a few difficulties wrestling with Photoshop oddities (bugs?) that made this template painful, hopefully I've narrowed down the process enough so this should become easier.Read More
We get contacted quite a bit about the prospect of porting applications that were already written using the Android API. In this quick tutorial we will walk you thru the paces of converting a simple Android application to a Codename One application. We will also start with some basic tips covering the differences between Android and Codename One development.Read More
Generating a template from a PSD isn't hard but it isn't a trivial task either, in this recurring segment I will try to generate good looking Codename One templates from freely available PSD files. Since this requires some effort I don't think I'll be able to keep this as a weekly segment but I'll try to post such a template once every two or three weeks. If you know of a free PSD that you'd like to see as a Codename One app point me at it in the comments and I might integrate it in a future post!Read More
There are many Codename One resources for building native mobile apps but they are often all over the place, in this blog post I'll try to concentrate the best resources for people who already know Java and are looking to pick up Codename One. If you don't know Java yet please check out this post where we discuss resources for beginners to Java.Read More
A few years back I wrote an article for O`Reilly covering the advantages of cross platform over native OS code. Almost 3 years have passed and a lot has changed in our industry so I wanted to re-examine how this impacts my perspective on cross platform vs. native.Read More
We often build one app and sell it to multiple customers. After all, most customers ask for similar things with minor changes. E.g. if I build a restaurant app and then sell it to one establishment I can then resell it to another with almost no change at all...Read More
When we designed the icon for the new Kitchen Sink demo we tried to use material design principals. We thought it would look reasonable on iOS but it looked awful. So we decided to adapt the design and create a separate yet similar icon for iOS.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
We tried migrating to the new iOS build servers before and decided to revert the change due to xcode crashes. After a lot of work we think the new server code is ready for production. We will try to migrate to these new servers again on the 28th of August (Sunday) to minimize impact if something goes horribly wrong.Read More
We hoped to get the xcode 7 migration on the build servers out before version 3.5 but the change had problems and we chose to revert. We postponed the change so we can get 3.5 out of the door...
This Sunday we'll deploy a server update that should be the first step in the migration.
We finished the final major piece of the offline build offering that we announced in July!
This Sunday we will update the plugins to include this ability as an option. Once installed you can use the instructions below to install the offline build service.
Millions of Codename One apps are installed on devices every month. Most of them aren't in the gallery and are never featured in this recurring segment. We are looking for something exceptional in apps that we feature here and Ana Paltel fits that bill. It has a very polished UI and it is shipped by a major operator. It uses some unique Codename One features to boot making it even more interesting.Read More
We got a lot of requests from developers over the years to do an iOS style alphabet side scroll. Some developers implements such scrolling but no one made it generic or contributed it back. So a recent stack overflow question got me thinking about how easy it would be to actually implement something like that and I decided to try...Read More
I blogged about peer components all the way back in 2014 trying to explain basic facts about their limitations/behaviors. A lot of those limitations are inherent but over the past year or so we've been thinking more and more about the z-order limitation.Read More
A common issue we get from developers relates to minor differences between devices which are often very hard to quantify. They are also very hard to explain to the developers in some occasions. One of the biggest points of difficulty is density which is a very hard concept to grasp and it's often hard to know which image will be used from the set of multi images or how many pixels will be used for 1 millimeter.Read More
Background fetch allows an app to periodically "fetch" information from the network while the app is in the background. This is scheduled by the native platform, where apps that support background fetch will be started up (in the background), and their
performBackgroundFetch method will be invoked.
We'll be migrating to the new iOS build servers this Sunday and this does entail one major thing you need to be aware of. With the new version of xcode http URL's are blocked by Apple. We blogged about this a while back but this bares repeating as it's something a lot of you will start running into.Read More
Bluetooth is one of those specs that makes me take a step back... It's nuanced, complex and multi-layered. That isn't necessarily bad, it solves a remarkably hard problem. Unfortunately when people say the words "bluetooth support" it's rare to find two people who actually mean the same thing!Read More
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over eighteen thousand libraries and can help you scale your projects elegantly. Cocoapods can be used in your Codename One project to include native iOS libraries without having to go through the hassle of bundling the actual library into your project. Rather than bundling .h and .a files in your ios/native directory, you can specify which "pods" your app uses via the
ios.pods build hint. (There are other build hints also if you need more advanced features).
We were stuck on an "old" version of xcode in the build servers. This hasn't been a big deal for most features but in some cases we are running into issues e.g. in using the full capabilities of the new iPad or 3d touch. The reason for this is Apples backwards compatibility policy.Read More
We're all pretty jaded when it comes to software but when I first saw yHomework I was completely floored by it!
Where was this tool when I was in junior high?
If you haven't seen yHomework in action I suggest you give it a try right now on your Android or iOS device.
One of the often requested features in Codename One is zip support, we had some issues with it until a couple of years back we added tar and later gzip support. But people still asked for standard zip file support which was missing.
Pumpop is a social networking app in the spirit of tinder that is available globally and installed on many devices all over the world. One of its major draws is it's portability which will soon extend to Windows Phone as well.Read More
The jat app is very similar to whatsapp in some regards but is more oriented towards group communication than SMS replacement. Over the past couple of weeks we picked it up as a great communication tool in our team. It uses push notifications to notify and activates accounts via SMS. This makes it very convenient for someone like myself who moves between devices constantly.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.
Steve committed the upcoming Windows port to out github repository it's still work in progress so you can't physically target it as part of the build system although we hope to move this port out relatively quickly. This should be more doable thanks to the iKVM route and the work from Fabricio both of which saved a lot of the effort in this port.Read More
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
We wrote quite a bit about the architecture of the new VM we built for iOS and why we built it. Up until recently we always viewed it as a Codename One specific tool. Something that would only be useful for us. We used open source because "that is our way" and didn't give it much thought after that.
It started to dawn on us recently that this tool could be useful for other developers that might take it in a different direction from our original intention. We also came to the conclusion that this might not be a bad idea altogether.
So we are are effectively launching the Codename One VM as ParparVM and it includes a lot of interesting benefits.
We became infatuated with icon fonts a while back and used them quite a bit, recently we added the FontImage class that made them really easy to use.
However, up until now you had to download a font. Look up the value and enter it in. This was OK but not ideal in terms of syntax/availability especially for simpler apps.
Today we dealt with some push messages overloading our servers, some of the apps developed in Codename One are remarkably successful and as a result our push servers got bogged down.
To mitigate that and prevent service interruptions we moved all push activity to the new servers, this effectively means that a push operation on the old servers will map to the new servers seamlessly. This also means that we no longer support the null push target even for the old push servers. Its just too expensive to support on scale of 150M+ devices.
A common trick for animating Components in Codename One is to set their preferred size to 0 and then invoke
animateLayout() thus triggering an animation to hide said component. There are several issues with this trick but one of the biggest ones is the fact that
setPreferredSize has been deprecated for quite a while.
So you have finished your app and tested it on the simulator. Everything looks good. You're now ready to proceed with testing on your iPhone. You select the "Send iOS Debug Build" menu item and wait for the build server to work its magic, but then you're faced with a notice that iOS builds require a valid certificate and provisioning profile. What a hassle!Read More
Up until now when building with include sources for iOS we also included a btres directory which was necessary for the old VM but no longer necessary in the new VM. This increased the distribution size considerably and we are now removing it to speed up the builds and reduce server costs. When we were in the process of reviewing the sizes of apps we noticed quite a few apps with resources weighing well over 5mb which would probably cause performance issues for your application, we suggest reviewing such apps and optimizing them.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.
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...Read More
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.
Now that the new website is live we are down to standard business again beyond just the typical bug fixes. Chen just updated the gallery support to include the ability to pick a video file and not just an image file...Read More
Chen was working with a customer that needed some specific ad network support and decided to open source some of that work. We now have integration with Flurry both for its ads and analytics support both of which are pretty cool and have some distinct advantages over the current Google equivalents.Read More
Codename One provides a rich set of drawing primitives in its Graphics class. It allows you to draw text, shapes, and images to the screen. The position where these elements will be rendered is determined based on a combination of Graphics state information (e.g. the current translation, and transform) and coordinates that are passed to the drawing method. Understanding how these coordinates are calculated can be tricky when you first begin using the API.Read More