Post Image

Native File Open Dialogs

Codename One has always provided access to the device's photos and videos via `Display.openGallery()` but it hasn't provided an API to open arbitrary file types because this type of functionality was not available on most mobile platforms. Times have changed and most platforms now offer support for more than just images and photos, so we decided to provide access to this functionality as a cn1lib. Here is a short introduction to the cn1-filechooser library.

Read More
Post Image

UWP Native Interfaces - Mix C# and Java

The next plugin update will add support for native interfaces in UWP. This opens the door for you to really dig into the native features of Windows if you wish to do so. Crucially, this will also allow us to push forward with windows support on some of the cn1libs that require native functionality.

Read More
Post Image

CSS Tip: Using CSS to Import Images

The Codename One CSS plugin is a handy tool to style your app with CSS. This includes setting borders, padding, margin, fonts, colors, and pretty much everything else that you might otherwise do in the resource editor. However, there are some other cool things that this plugin can do for you, such as importing multi-images into your resource file. Let me demonstrate with a small snippet.

Read More
Post Image

TIP: Get Stack State (trace) from Java Processes

One of the most frustrating things that can happen to developers is when you manage to reproduce a rare bug but you are not in the debugger when you did that. My kingdom for a stack trace...
But this is also pretty frustrating when you work on a tool like Codename One's designer or GUIBuilder and they suddenly freeze with no visible error. How do you provide a viable bug report for that?

Read More
Post Image

Questions of the Week 31

We try to space out plugin updates as much as reasonably possible but unfortunately we need to push out an update this week to fix a critical regression in the new GUI builder. Hopefully it is more stable now and we can go back to working on new features.

Read More
Post Image

Cool Text Effects for Your Mobile App on iPhone (iOS), Android etc.

FontBox is a mature java library for loading, manipulating, and rendering fonts in Java. It gives you direct access to the font glyphs so that you can perform effects or transformations on them. A couple of years ago, I ported FontBox to Codename One, but since CN1 didn't yet include support for drawing shapes, I made it dependent upon the CN1Pisces library, which did support drawing shapes. This was cool but it had some major limitations; the main one being that FontBox fonts could only be used to draw strings on Pisces graphics contexts, which can only be rendered to an image - not directly to the screen. This meant that you couldn't *just* use a FontBox font in your app (e.g. in a label or a button). You could only use it to write on an image.

Read More
Post Image

Partners, Demos, Custom GUI Component & iPhone-Old Deprecation

We are launching a partners page in the website that will refer to consultants that we recommend/approve. If you are a software development company that works with Codename One we'd like to feature you in our website and provide the following benefits...

Read More
Post Image

Associating Your App with File Extension/Mime Type on iPhone (iOS), Android & Windows

One of the compelling reasons to go native (vs say a web app) is to better integrate with the platform. One form of integration that is frequently handy is the ability register your app to handle certain file types so that it is listed as one of the options when a user tries to view a file of that type. Codename One supports this use case via the "AppArg" display property - the same, simple mechanism used for handling custom link types in your app. "feature X" from Java isn't supported. In this post I'd like to explain the "bigger picture" or why less is more...

Read More
Post Image

TIP: Create Square Icons

This is inspired by this post that covers the process of creating different icons for different OS builds. But here I'd like to discuss the lowest common denominator and how we got it wrong!

Read More
Post Image

Questions of the Week 30

30 is probably the perfect time to stop with Roman numerals... We don't want to give search engines the wrong idea.
This has been a really busy week with the new Phoenix demo and quite a few other developments. October is finally over and we are all back home from vacations & travels. We are still in "recovery mode" but looking at the pipeline we have pretty exciting things coming up!

Read More