Latest posts from Codename One.
Blog

Codename One 6.0 "Chat" is now Live
We are thrilled to announce the release of Codename One 6.0 – Chat. Codename One is an open source “Write Once Run Anywhere” mobile platform for Java and Kotlin developers! With this release we introduced Codename One Build which is one of the biggest overhauls to the Codename One workflow since its inception. We also refined and updated many underlying technologies e.g. the xcode 10.1 migration, WKWebView support, push replies, badges on Android and much more. ...

VM Enhancements, Full Screen and XML
We are in code freeze… As part of the release process I’m gathering the changes we implemented over the past few months. Quite a few didn’t get a blog post during this time. So here is a list of the important things we didn’t document. VM Changes We did two big things for ParparVM (our iOS VM) which allowed us to expose this functionality in other platforms as well. First is support for most of the small methods in Class which can be helpful when we write some generic code. Specifically the methods: isEnum(), isSynthetic(), isInterface(), isAnonymousClass(), isPrimitive() and isAnnotation(). ...

Codefreeze for Chat (Codename One 6.0)
We’re entering code freeze later tonight which means no further commits will be made. After the code freeze only reviewed commits can be cherry picked. Only critical bugs will be fixed at that point. We will push out a new plugin update and tools tomorrow morning. They will be labeled 6.0 and serve as release candidates. If there are issues we’ll push out further updates during the week. ...

Preparing for Codename One 6.0 – Chat
Codename One 6.0 AKA Chat will launch on February 27th. We’re pushing this release a week back to finish the open issues. We will enter code freeze on the 20th exactly one week from today. After the code freeze only reviewed commits can be cherry picked. Only critical bugs will be fixed at that point. Chat We named the releases of Codename One based on the signature app we built on top of that given release. 5.0 was named social and 4.0 was named Taxi representing the Facebook/Uber clones respectively. Version 6.0 is named Chat as we built a WhatsApp Clone during the release cycle. ...

File Chooser on Xcode 10.1
The recent migration to xcode 10.1 broke builds for apps using the file chooser API. In order to use that API we need to make changes to the provisioning profile to include iCloud support. With the new version you must have a container associated with iCloud for this to work. To fix this follow these steps: Login to https://developer.apple.com/account/ios/identifier/bundle Under App IDs select your app Click Edit Check iCloud and select Include CloudKit support (requires Xcode 6) ...

WhatsApp Clone GA
The WhatsApp clone app is finally up in the online course. With that finally out of the way we can turn our attention to Codename One 6.0 which is due dangerously soon. We might even slightly postpone the release so we can finish crucial RFE’s/issues. Getting the WhatsApp clone out has been an ordeal, not so much because of complexity (the app is much simpler than Uber or Facebook)… It was due to the amount of concurrent things I had to deal with during this time. ...

Rich Push Notifications Improved
Last week Steve committed the final piece of the rich push notification support RFE. This commit introduces support for replies in push messages. This came too late for the whatsapp clone but if you want to build an app of this type you would need this feature. The app main class should implement PushActionProvider. This defines a method that returns a set of categories. E.g. public PushActionCategory[] getPushActionCategories() { return new PushActionCategory[]{ new PushActionCategory("fo", new PushAction[]{ new PushAction("yes", "Yes"), new PushAction("no", "No"), new PushAction("maybe", "Maybe", null, "Enter reason", "Reply") }) }; } Then, when sending a push notification, you can specify the “category” of the message. If the category corresponds with a defined category in your getPushActionCategories() method, then the user will be presented with a set of buttons corresponding to the PushActions in that category. ...

Native Controls
We supported native widgets within the native interface feature since the first public beta. However, this requires native coding and isn’t always trivial. Normally you don’t really need to do that. E.g. for text fields we implicitly convert the field to a native field as necessary. However, if you wish to use the password manager of the device this won’t work. To solve this Steve introduced a new cn1lib: cn1-native-controls. This library wraps some native widgets and lets us use some features that might be tricky without them. Good use cases for this include the password managers which need a native text widget constantly in that sport. Another use case would be iOS’s SMS interception text field that can automatically intercept the next incoming SMS and set it to a special native text field. ...

WhatsApp Clone
I’ve been pretty busy this new year with a lot of unpredictable detours. As such I completely missed the deadline of releasing the whatsapp clone application I promissed for the end of year. I’m now in the process of uploading modules into the online course for the WhatsApp clone. Unlike previous clones I plan to make this far simpler as a lot of the work was already covered in the Facebook Clone module. This mostly focuses on features that weren’t covered there and fixes some things e.g. SMS activation is handled in the server side. ...

Xcode 10.1 Migration Phase 2
As I mentioned recently, we’re migrating to xcode 10.1. This weekend we entered phase 2 of the migration which allows you to test your builds with xcode 10.1. To do this just set the build hint: ios.xcode_version=10.1. If you run into issues with xcode 10.1 builds let us know ASAP. This is very urgent as phased 3 will kick in this coming Friday. In phase 3 we will flip 10.1 as the default which means that builds sent on Friday will implicitly target xcode 10.1. ...

Xcode 10.1 Migration
Over the past month Apple started sending out warnings that they will no longer accept apps built with older SDK’s starting this March. To preempt that we will update our servers to use xcode 10.1 over the next couple of weeks. This change should be seamless for the most part but some odd behaviors or bugs usually rise as a result of such migrations. To test if a sudden regression is caused by this migration you can explicitly force xcode 9.2 for compatibility by using the build hint: ios.xcode_version=9.2. ...

TIP: Global Settings
A somewhat hidden feature of Codename One Settings is the ability to define global settings. Global settings are useful when you have multiple projects and would like to use common defaults. E.g. we have standard certificate definitions for iOS/Android that allow us to just send a device build on a new project without configuring anything. __ For iOS this can only work for debug builds and won’t allow features such as push etc. It requires some work… ...