Latest posts from Codename One.
Blog

Spring Template and more about the Bootcamp
__ It’s LIVE! Check out the bootcamp signup here. Thanks for all the comments and interest on the previous post. In that post I discussed the importance of great app design and showed some of the cool newish demos I built to highlight the general direction. I also talked about the importance of personal mentorship especially with new/elaborate mobile technologies where everything is different. I also discussed the bootcamp with broad strokes, I won’t go into too many details about it today (I’ll write more later in the week). Just to clarify the general direction, the main focus will be on UI/UX. This means we will build a complete production grade application from the ground up with server connectivity and everything… I’m aiming this as an advanced bootcamp (deep into native interfaces etc.) but I have provisions for people who are new to Codename One. One of the things that really excites me is getting to know you (our community) better on a more personal level. I find it very hard to keep up with all the thousands of people that I’ve communicated with in the past 5 years. Putting faces, voices and some context is something I’m eagerly looking forward to. ...

Questions of the Week 45
We had some painful downtime due the the big Amazon S3 crash that brought down a huge amount of services with it. I’ve been toying with the idea of improving the system so it doesn’t fully depend on S3 (mostly for performance as S3 isn’t as fast as one would expect). But right now we are so busy with “real work” that this probably won’t happen. This weeks update will again replace the push servers with a newer version that deals with encoding the push key on the newer supported platforms as well as support for UWP. ...

Full Stack Java Bootcamp
__ It’s LIVE! Check out the bootcamp signup here. Thanks again to everyone who answered my questions. I got tons of valuable feedback on our work & what you would like to learn. It was super helpful and I’m grateful to all of you as you are literally shaping how this bootcamp (and the future of Codename One). I’m sorry if I was brief in some of the thank you emails, it took some time as I wrote them all personally and worked well into the night the other day. ...

Push (Almost) Everywhere
Just last week I mentioned that we wanted to get push working on Windows & we’re pretty thrilled to announce that it’s available already… This means that we now support push on pretty much any major device with the exception of the Safari web browser. As part of this change we also decided to change the push keys for the JavaScript push implementation so I suggest waiting for the next update before you push out a new version of your app. The crux of the issue was that the web push key included illegal characters for the web so the fix when using the client side send push API’s is to encode the arguments to the server. ...

TIP: Select Table Row
Before we go into the tip I’d like to start with an apology to all the people I didn’t get back to. Earlier today I sent an email asking for help with the upcoming Codename One bootcamp. The anticipation and resulting email flood took me totally off-guard as I expected a couple of dozen responses in the best case scenario and got much more… I started answering as fast as I could and getting back to people I already answered in the back and forth but quickly this became untenable and I’m seeing my backlog pile growing. Chen and others around here tried to help but I prefer to do this personally as I’d like the feedback to sink into my brain not as an afterthought as it is very valuable! ...

Questions of the Week 44
This weeks release adds support for JavaScript push but I’d recommend you don’t use it in production yet… The main issue is that we might change the way JavaScript push keys are generated so it might be better to put this on hold or only experiment with this for now. Regardless it’s a pretty big change to the push server so we have the old version standing by and might revert it if things get hairy. ...

Security Section
We’ve had a lot of security related posts in the past few months as we refined many edge cases with some customers. These posts are difficult to comb through as they are all over the place, and it’s hard to get a glance of “what’s available.” So we added a new security section to the developer guide which adds some general information about Codename One security and includes most of the details about what you can do in terms of security. ...

Push on JavaScript
Up until now push notification in Codename One only worked for Android & iOS devices. This is about to change this weekend when the JavaScript port should (almost) seamlessly start working with push! This is pretty cool as push to the web is a pain with every browser taking a somewhat different route but with Codename One this will “mostly” work. The JavaScript port will generate push keys that match the notation cn1-web. ...

TIP: Lightweight Rich Text View
A very common request is support for rich text in Codename One, this is hard to do in a generic/performant cross platform way but can be done as I explained in my answer here. This is pretty common though so it might be worth it doing this in a generic way. Building a “proper” rich text view would take some work as there are many edge cases & complexities. However, since we already have an XML parser that’s perfectly capable of parsing HTML I decided to try a very simple HTML based syntax just to show how easy it would be to create something generic like this. I avoided the “link” use case as that would require some link handler code and I avoided font sizes/colors as I didn’t want to go into attributes and related complexities. ...

Questions of the Week 43
Surprisingly the big VM update we had last week didn’t trigger any major regressions but we did break some versioned build behavior with the string obfuscation feature. Todays update is far more tame and should mostly include minor bug fixes and not to many new/disruptive features. There were a lot of questions but most of them weren’t broad enough for this forum, so I’ll discuss only two questions and in both cases I’ll talk less about the question and more about the implications. ...

ToastBar Actions & URLImage Caching
I wrote on the Friday post about a few cool pull requests from Diamond but I didn’t provide a usage example for that API. Probably the best usage example is gmail style undo. If you are not a gmail user then the gmail app essentially never prompts for confirmation! It just does whatever you ask and pops a “toast message” with an option to undo. So if you clicked by mistake you have 3-4 seconds to take that back! ...

Obfuscated Constants
One of the first things a hacker will do when compromising an app is look at it. E.g. if I want to exploit a bank’s login UI I would look at the label next to the login and then search for it in the decompiled code. So if the UI has the String “enter user name and password” I can search for that. It won’t lead directly to a hack or exploit but it will show you the approximate area of the code where we should look and it makes the first step that much easier. Obfuscation helps as it removes descriptive method names but it can’t hide the Strings we use in constants. So if an app has a secret encoding it even slightly can make a difference… ...