Post Image

Tutorials & Resources - Learn Java on Mobile videos courses for iOS, Android etc.

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
Post Image

Cross Platform Mobile still Better than Naive in age of Flat Design

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
Post Image

Deploy the Same Mobile App/Template Multiple Times

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
Post Image

Floating Button

The material design floating action button is a powerful tool for promoting an action within your application. Quite a few Codename One developers implemented with own interpretation of this UI element and with the coming update we will have an official implementation.

Read More
Post Image

Different Icons

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
Post Image

New Peer & GUI Builder Tree

If you relied on the android.newPeer build hint it will no longer be available starting with this update. When you build for 3.5 you will still get the old behavior if you define that hint but otherwise it will be ignored. This is a precursor step to merging the newPeer branch into the main branch. It's an important step to help us move forward with one code base!

Read More
Post Image

Java 8 & API 23 defaults

One of the biggest changes we made in the past couple of years was the introduction of Java 8 language support features and making it the default target. We are now ready for the next step...

Read More
Post Image

Performant Radial Gradients

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
Post Image

Improved Background Behavior

A couple of years ago at Google IO one of the prominent speakers turned to the audience and asked them: "Raise your hands if you understand the activity lifecycle". He then proceeded to call them "liars", claiming that after all his years at Google he still doesn't get it properly...

Read More
Post Image

New Peers on by Default on Android

Starting with the next Friday release we will migrate to the new peer support. This migration will allow us to focus on a single code base and remove the branch where we are maintaining the old peer support.

Read More
Post Image

Offline Build

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.

Read More
Post Image

Featured App - Ana Paltel

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
Post Image

New Android Peer Mode

As we mentioned recently we have a new idea on how peering can be improved and we just deployed a this into our build servers in the weekend update. This is highly experimental and might crash instantly which is why we hope you give it a test drive and see how it feels before we switch it on by default.

Read More
Post Image

Peering Revisited

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
Post Image

Device Tester

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
Post Image

Background Fetch

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.

Read More
Post Image

Debug a Codename One app on an Android Device

Debugging Codename One apps on iOS devices has been documented well with a video for years, we didn't spend too much time outlining the Android counterpart mostly because we didn't really use it as much and it was far simpler.

Read More
Post Image

Bluetooth Support

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
Post Image

Featured App - yHomework

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.

Read More
Post Image

Marshmallow Permissions in the Simulator and Native Code

We talked about the new Android 6 (Marshmallow) permissions in Codename One last week and so far we've been pretty happy with the result. We had some build regressions on the older Ant based build path but those were fixed shortly after and it's been smooth sailing since then. As part of the transition to the new permissions system we added two features to the simulator and the AndroidNativeUtil class.

Read More
Post Image

Featured App - Pumpop

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
Post Image

Switching on Android Marshmallow Permission Prompts

Up until Marshmallow (version 6) Android used a rather obtuse permission system that very few end users understood. With API level 23 (Marshmallow) Android finally shifted to a structure that makes more sense similarly to iOS. Marshmallow asks a users permission the first time an API is used e.g. when accessing contacts the user will receive a prompt whether to allow contacts access.

Read More
Post Image

Should we use Gradients?

With the latest version of the Android port we fixed a long running bug in gradient drawing on Android. Gradients should now work correctly and will also be performant potentially even faster than images on Android. Our standing recommendation is to avoid gradients as they pose a memory/performance penalty on most platforms and so this change raises the question of using gradients back into the forefront.

Read More
Post Image

Featured App - JAT Communication

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
Post Image

Open File & Rendering

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.

Read More
Post Image

Why we Don't Import Android Native Code?

When we first started to present Codename One to investors a very prominent local investor said he'd commit to a round of funding if we allow Android developers to import native Android apps to Codename One. We passed on that which in retrospect might have been a mistake but the technical challenges were the main reason for that decision.

Read More
Post Image

Toolbar Default, Millimeter Sizes & Weekly Releases

Starting with the next update of Codename One (later this week) we will switch Toolbar on as the default for all newly created projects. This doesn't mean much for most of us as existing projects won't be affected, however if you are creating a new project this means you won't need to create a Toolbar for every Form and that we won't have to deal with as many issues related to the native Android title.

Read More
Post Image

SEO, Gallery, Performance, JavaScript & Gradle

We are trying to improve the visibility of Codename One within search engines and as part of that we think we can also help you guys improve your visibility. When you submit your apps to the app gallery we provide dofollow links to your website/app store listings. We'd appreciate if you place dofollow links back to https://www.codenameone.com/ which you can place in a very hidden/unobtrusive way. This helps us increase our page rank and as a result will improve your page rank as we link back to you.

Read More
Post Image

Android Gradle Build Status & Minor Changes

I've been remarkably busy working on issues and documentation so I neglected an important announcement I had to make. Over the weekend we flipped the default build from gradle back to ant. So effectively if you don't set any build hint the behavior will be android.gradle false which should work fine for most of you. This is temporary but we felt it was necessary as a stopgap measure.

Read More
Post Image

A Thank You & an Important Update On Android Builds

We'd like to thank all of you who signed up to the pro subscription, the release of 3.3 is the perfect time to do that. So we are opening up the JavaScript build target for 1 year until March 1st 2017 to all current pro subscribers!
If you have a pro subscription you can start sending a JavaScript build right away and experiment with portingyour app to the web...
If you don't have a pro license currently then you have until March 15th to upgrade and enjoy this offer. After March 15th the JavaScript port will return to enterprise only status for everyone who didn't signup prior to that.

Read More
Post Image

Debating Brendan Eich Over Android-OpenJDK Move

I had a big post ready for today but after a long twitter debate with @BrendanEich I had to write a followup as twitter is a poor medium for that level of debate.
This started with a blog post from Andreas Gal who effectively took the exact opposite stance to mine on Google's move to OpenJDK.
Then Mr. Eich picked it up...

Read More
Post Image

Video, New Defaults & BarCode/QRCode Changes

We released a new version of the introducing Codename One video almost a month ago but we just neglected to highlight it in the blog. Our old videos are pretty dated by now and we use far better toolchains for video production today, so we are in the process of redoing all our old videos. This is a long and tedious process that we do while producing newer content, fixes and moving forward. So the timeline of such updates is quite volatile. Check out the new video below.

Read More
Post Image

The Sad State of Android Performance Tooling

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
Post Image

Material Icons, Background Music, Geofencing & Gradle

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.

Read More
Post Image

Migration To The New Push Servers Completed

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.

Read More

Integrating Android 3rd Party Libraries & JNI

Post Image

While its pretty easy to use native interfaces to write Android native code some things aren't necessarily as obvious. E.g. if you want to integrate a 3rd party library, specifically one that includes native C JNI code this process is somewhat undocumented. If you need to integrate such a library into your native calls you have the following 3 options:

Read More

Flurry Interstitial Ads & Analytics

Post Image

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 Graphics - Understanding Coordinates

Post Image

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

Easy Demos, Flip & More

Post Image

One of the pains in Codename One is the access to the demos, yes we have the downloadable demo bundle and the SVN but for a compete novice to Codename One this isn't front and center. Chen decided to address that by embedding the latest versions of the demos both into the Eclipse and the NetBeans plugins, now when you create a new Codename One project you can also create a demo project and "just run it". This allows you to quickly learn/debug our sample code which should help with the Codename One learning curve.

Read More