Open Source & Free  

CSS in CN1Libs

We’ve just added support for including CSS inside of Codename One library projects so that CSS styles can now be distributed inside a cn1lib. This opens up a world of possibilities for creating module UI libraries and themes. How it works To begin, you just need to add a “css” directory inside your Codename One CSS in CN1Libs

Migrating Legacy Applications to CSS

If you have an existing Codename One app that uses the designer for its theme, then you may have been reluctant to try to migrate it to CSS. Codename One projects are assumed to be using either CSS or the designer for their themes. But not both at the same time. When an app has Migrating Legacy Applications to CSS

Safe Areas

Apple is so very clever with its designs. With the iPhone X, they found way to squeeze in a larger screen without increasing the phone dimensions. The screen nearly covers the entire front face of the phone. The “notch”, as it has come to be known, may have been a practical concession (they needed to Safe Areas

Sign-in with Apple Support

We have just finished the initial release of our “Sign-in with Apple” cn1lib, which adds “Sign-in with Apple” support to Codename One apps. On iOS 13 and higher, this will use Apple’s native Authentication framework. On other platforms (e.g. Android, Desktop, and Simulator), this will use Apple’s Oauth2 authentication service. The main motivation for adding Sign-in with Apple Support

Picking a Dialog Type

The duality of InteractionDialog and Dialog is often confusing to the Codename One newcomer (and to some degree to veteran developers too). This is in part due to the multiple behavior differences that extend far beyond the “official” functionality difference. This has its roots in history that predated Codename One. In this post I’ll try Picking a Dialog Type

Live Streaming with Codename One and Wowza

Two months ago I published the CN1Lib “Wowza Live Streaming Events”, as usual you can install that by the Extension Manager. The purpose of this CN1Lib is to add live streaming capabilities to iOS and Android Codename One apps, hiding all the complexities and reducing the effort. The Wowza cn1lib has been deprecated since the Live Streaming with Codename One and Wowza

New Low-level Microphone API

Today’s blog post will delve further into our new media features. We’ve recently added an API to access raw PCM data from the device’s microphone. Previously, the media recording API could only be configured to save audio to a file. This is fine for most use cases, but sometimes it is necessary to access the New Low-level Microphone API

Preliminary course for mobile cross-platform development with Java and Codename One

I’m Francesco Galgani, a developer and a Codename One enthusiast. Few days ago I published the first version of an Italian free preliminary course for mobile cross-platform development with Java + Codename One. I’ll probably write other articles, however the first module is complete. This course is intended for people interested in app development, but Preliminary course for mobile cross-platform development with Java and Codename One

Javascript Media Restrictions to be Aware Of

Codename One provides play() and pause() methods as part of the Media interface, which you can use to start and stop media clips programmatically. If you are deploying your app to the browser using the Javascript port, then you should be aware of some restrictions imposed by modern web browsers on media playback, and how Javascript Media Restrictions to be Aware Of

Async Play and Pause Support

We’ve recently released a few updates to our Media APIs in order to support a wider variety of use cases. One of these upgrades is the new AsyncMedia interface, which includes async play and pause support. The Media interface has always had play() and pause() methods, but it didn’t provide an easy way to detect Async Play and Pause Support

Using Component Placeholders While Loading Data

In my last post I introduced the new CN.invokeWithoutBlocking() method as a means of ensuring that your UI construction code doesn’t run into any “blocking” that could negatively affect user experience. In cases where you need to perform a network request to help build your UI, I offered some recommendations for moving blocking code out Using Component Placeholders While Loading Data

When You Cannot Afford to Block the EDT

We recently added support for disabling invokeAndBlock() for certain sections of code. The syntax is: CN.invokeWithoutBlocking(()->{ // This code is not allowed to call invokeAndBlock() }); If any attempt is made to execute invokeAndBlock() inside that block of code, it will throw a BlockingDisallowedException. This can be useful for ensuring that your UI will be When You Cannot Afford to Block the EDT