Latest posts from Codename One.
Blog

Permanent SideMenu, getAllStyles, Scrollbar & more
We’ve been so busy recently that changes and features keep piling up with no end… Permanent Sidemenu It was always possible to create a permanent side menu but up until now it wasn’t trivial. For Tablets/Desktops the side menu UI is perfect, but the folding aspect of it isn’t as great. We have more space so we’d like to keep it open all the time. Unfortunately, the side menu implementation wasn’t very suited for such usage. With the Toolbar this became much easier to implement in a generic way. Right now we hardcoded the side menu to the left, fixing it to work for all sides would requite some effort. But its still pretty neat, just do something like this in your init(Object) method and your code will implicitly adapt to tablets/desktops if you used the Toolbar API. ...

Building Cloud-powered Native Mobile Apps with Parse.com and Codename One
A couple of weeks ago I created a simple social network app as part of the Codename One webinar. This app provided functionality similar to the Facebook app. Send and Accept friend requests Post news View news items posted by you and your friends For the server, I used a PHP/MySQL REST interface, and wrote a very thin client in Codename One. Both the server and client project are on GitHub so you can review it and install it yourself on your own server. ...

Jetbrains Is Totally Right With Its Subscription Model
JetBrains recently announced that they are moving to a subscription service and people freaked. As an entrepreneur and a guy who spent a lot of time in big companies (e.g. Sun/Oracle) I totally applaud JetBrains for the move and think they did the right thing! Yes some customers will complain loudly and use inappropriate language. But ultimately software is a service and should be sold as a service. The complainers should not focus on their own issues and start looking at the issues of running a software company. Software is developed by people who need salaries, subscriptions mean we can hire easily and know reasonably well that we will have enough for salaries/expansion. Licenses complicate things financially and cause a great deal of fluctuations. They also create lopsided companies where the sales team is much bigger and more dominant than development (e.g. Oracle vs. Sun). ...

New Push Servers
We are starting the complete overhaul of our push implementation that will allow us to deliver improved push related fixes/features and provide more reliability to the push service. When we designed our push offering initially it was focused around the limitations of Google App Engine which we are finally phasing out. The new servers are no longer constrained by this can scale far more easily and efficiently for all requirements. ...

Java Mobile Development Webinar 2: The Sequel
On Thursday morning we rolled the cameras for chapter 2 of our exciting new webinar series. This time around there were far fewer (though not zero) technical issues, and we were able to share a productive hour of mobile app development in the company of our fellow coders. Last time, we built a social media app similar to Facebook. It highlighted how you can easily build REST client using Codename One. This time around we changed directions and built a game: Classic Flickr Concentration. Basically it is a matching game where you get a set of cards, and you tap them to flip them over. You just need to find the matches. My two-year-old daughter loves this game, by the way. ...

Deprecations, Simplified cn1lib installs & Theme Layering
Deprecations We decided to discontinue support for building without a certificate, this support was added initially because generating an iOS certificate was so difficult and we wanted developers to see that “it works” before committing to the expense. However, this process is wrought with bugs that are often hard to trace back and error prone. Added to that is the fact that we now have the new certificate wizard which makes the process simpler thus removing the final blocker (no need for a Mac). We will block this functionality in the build servers by next week and thru the plugin after that. ...

Javascript, Grow up and Get Threaded
The concept of threads in the Javascript community is a controversial one. The founders and leaders are dogmatically against threads, and have been from very early on. This 2007 article by Brendan Eich reveals his feeling on threads (they suck!) and the advancements in subsequent years seem to have followed this sentiment by vigorously avoiding anything thread-like. Countless “solutions” and workarounds have been developed by clever programmers to try to improve the situation without actually adding threads. Web Workers solve some concurrency issues, but don’t come close to solving the general case, and Promises are currently a popular way to make threadless code more readable. Now with ES6, we have generators and the yield statement offering yet a new ugly workaround for this glaring language omission. These are all ugly patches that make code less readable and less maintainable, not more. ...

StartApp integration
When StartApp first launched a few years ago, they were a unique innovative new monetization channel to make money on Android. The Android developer bundled their SDK and once the app was installed a new search shortcut would appear on the user’s device, this allowed them to monetize on the search functionality. We had a smart integration with StartApp, were the developer checked a CheckBox on the plugin and the SDK got bundled on the cloud build. ...

SFU Mobile Development Workshop
A few weeks ago, in cooperation with Simon Fraser University’s School for Interactive Arts and Technology COOP office, I held a java mobile development workshop. This was a bit of an experiment to find out whether there was interest – plus it got me out of the code dungeon for a few hours :). As it turns out, SFU students do indeed have an appetite for learning, or for mobile development, or both. The workshop “sold” out within days of the initial email announcement. ...

Building A Chat App With Codename One Part 5
The chat UI is what we’ve been working at and in todays post we are going to build exactly that! Even better… We’ll integrate with Pubnub to make the app almost fully functional as a rudimentary chat app, which is pretty spectacular. In this section we’ll cover UI, storage (externalization), Pubnub & its JSON API… We’ll also use InteractionDialog to show notifications of incoming messages… Before we get started you will need to login to pubnub.com and sign up for an account where you will get two ID’s necessary when subscribing and pushing. ...

Java Mobile Development Webinar Recap
Tuesday morning I held a webinar on Java mobile development using Codename One. First of all, I’d like to thank all who signed up and attended. Unfortunately there were some technical difficulties with the Webinar software that caused some major glitches. Double thanks to those who endured and stayed to the end. We’ve learned from this experience and we will do better in future webinars. Since most of the people who signed up for the webinar indicated that they had no experience with Codename One, I spent the first 10 minutes or so introducing the framework, and showing some demos of some existing apps to give participants an idea of the possibilities. ...

Introducing Codename One WebSocket Support
Codename One already has two separate socket APIs: a low-level API similar to java.net.Socket and a higher-level event-based approach. So why do we need WebSockets? Here are 3 reasons: 1. Simplifies Server Code With low-level TCP sockets, you can’t just add a servlet to your existing Java web app to handle socket connections. You have to create your own server, and have it listen for connections on some custom port. You have to create your own sort of protocol. And all this just so you can pass messages. ...