Latest posts from Codename One.
Blog

Braintree (PayPal) cn1lib
As part of the bootcamp we wrote a couple of cn1libs and the first one is the Braintree cn1lib which allows us to do credit card payments within an app. If you aren’t familiar with Braintree it’s a PayPal company that provides payment integration for mobile devices. Notice that this differs from In App Purchase which targets “virtual goods”. This is useful for things like paying for physical goods and services e.g. paying for a taxi. ...

TIP: Use the Native EDT
The bootcamp is winding down and I’m finally back to our usual scheduled posts. I’d like to open with a common practice that isn’t nearly documented enough: use the native main/EDT threads. Our EDT serves many purposes but one of it’s biggest roles is portability. By having an EDT we get consistent behavior across platforms. iOS, Android & pretty much any modern OS has an EDT like thread that handles events etc. The problem is that they differ in their nuanced behavior. E.g. Android will usually respect calls off of the EDT and iOS will often crash. Some OS’s enforce EDT access rigidly and will throw an exception when you violate that… ...

Questions of the Week 49
Next week we’ll resume the bootcamp so I might publish one last blog post after this and that’s it for another two weeks. It’s been ages since our last plugin update so we’ll take this opportunity to release a new plugin release for all the IDE’s together with the other fixes and enhancements coming in this update. As a sidenote we have a long weekend on the western hemisphere this Friday so our support in the various channels will be a bit limited as a result. ...

Properties are Amazing
I wrote about properties before but I got a sense most people didn’t understand how amazing they truly are. In this post I would like to show you something they can do that’s incredibly cool and practical for your every day usage. To recap properties are high level attributes of an object that expose a mutable getter/setter which we can observe/introspect. I discussed these terms in the previous article so you can check there for a deeper recap. In this article I’ll show a cool demo and make it cooler with every stage! ...

Edit Styles in Simulator
One of the biggest pain points in Codename One is theming, there are several things we did to alleviate the problem but it’s an inherently complex problem. One difficulty people have is in the disconnect between what we see in the UI and the styling in the designer. This creates a disconnect that is often hard to bridge. In the past we added the Component Inspector tool to the simulator that allows you to discover the UIID’s of the various components and change the UIID’s to see the effect. This is very helpful for inspecting a running application and understanding what we see on the screen. Unfortunately, this is a half measure as we need to see something in the Component Inspector then open it in the designer restart the app rinse/repeat… ...

Big Changes and Bootcamp Updates
Since I haven’t blogged in a while a lot of stuff has piled up on my desk and I’ll get it out in batches in this post I’ll go over a few of the bigger changes we did while I was away on the bootcamp and also give you a bit of an update on what we’ve been doing within the bootcamp itself. The week before we launched the bootcamp our Mac build servers reached a very heavy workload, this was becoming disruptive to our general developer population as builds got queued at a high rate. After a bit of investigation it seems that this could usually be pinned to specific users with very long build times. ...

TIP: Track Designer & GUIBuilder Issues
We are on a mid-bootcamp break so the blog is back to life during this time (and there is so much to write!), more on that tomorrow but for now I’d like to write about fixing & tracking issues with the designer (resource editor) and the GUI builder. Both of these tools have issues most of which resolve around their connection to the IDE. The reason for this is that they are external tools that aren’t a part of the IDE, this allows us to support all 3 IDE’s without too much of an effort but also creates some issues that are often hard to debug. ...

Questions of the Week 48
This is our last blog post for the next 2 weeks, during the bootcamp we won’t be blogging and won’t have Friday releases until April 10th where the blog should return. This comes at a bit of a bad time when there is so much to write! Just yesterday Steve committed many new Java API’s features such as support for exception chaining and a lot of other cool features. These should be in the Friday release that we are putting out today. ...

Why did we do the Bootcamp?
I was chatting with one of the bootcamp attendants on the one on one calls and he asked me a question that I didn’t think you’d care about but I’m guessing it would be interesting: “Why are you doing the bootcamp?”. I was so focused on explaining the benefit to you that I neglected to explain what Codename One will gain from this bootcamp. This is probably something I should have explained before we closed registration as it would have explained why I have no intention of doing another bootcamp ever again. Bootcamps are hard work, they don’t scale & I need to take a lot of time off to get it done. ...

Changes to 2017 Milestones and DST Hotfix
We released an important fix for an issue with daylight saving in north America (DST), if you are experiencing weird issues only on iOS that could be attributed to time problems then please send a new build to see if the fix works correctly. Our iOS VM code made some assumptions about DST which were apparently false. We chose to release it outside of our regular update schedule due to the significance of this issue. ...

TIP: When Shouldn't I Use Codename One
Bootcamp registration closed well and we are currently in the pre-course (more on that in another post) and already the Facebook group of the bootcamp is seeing decent activity. Being as busy as I am I thought I’d lift a question that was asked there to headline this post: “When shouldn’t I use Codename One?”. That’s a great question. If Codename One was perfect for every use case it would probably suck. One of the biggest reasons for the complexity of the Android API is that it tries to answer every use case (device vendors, utility developers, game developers, app developers etc.). ...

Questions of the Week 47
Thank you all for the great response to the bootcamp and especially those of you who signed up. Registration is closing in about 2 hours and we have one last spot left! I’m sure we’ll put out some incredible showcase apps around May/June. Despite all my efforts going into the bootcamp things have been moving fast in Codename One development. Steve add a new blog post the other day detailing the new ComponentSelector API. It was actually committed last week but we didn’t have room in the blog schedule until this week. He also posted about the big changes he made to the Google Maps support and how those can be used with z-ordered peers to make Uber style applications a reality in Codename One. ...