The community forums are in BETA and closed to the public.

Feedback on "features" noticed by a PN newbee

I noticed a couple of little "features" as I was ramping up on how to use PubNub with Codename One, with PERL, and with JavaScript.

I am in the midst of making an engineering prototype for my application - a tracker that sends its location back to a home website. On the website is the location status of all of the users. To do this, I need to get push notification to each of the users at periodic intervals. On the Mobile side, I am using CodeName One to build apps cross-platform. (I'm developing both of these using the Eclipse Kepler environment.)

First off: It was not clear from the marketing literature that the Push functionality is not available in the Sandbox. That's probably the most essential part of my evaluation of this tool. Only having that available for a price (even with a 30-day free trial) was a bit of a surprise. That needs to be more clear in the marketing literature.

On to actually using the tool set - in short, I love it!!!

On the Web side: I have written the web server (home-base) app in Perl, and so was looking for a Perl API. I was encouraged to see that hidden deep within the bowels of PN, there actually IS a Perl API (had to do a bit of hunting to find it). However, I found that the Perl API has very little documentation. Most of the useful info is on

I also found that the API module for Perl 5 requires Perl version 5.10 or later. Unfortunately the CGI server I am using for my prototype application uses Perl version 5.8. So that didn't work.
On to Plan B

Plan B: On my base website, the PERL script prints HTML and JavaScript code to the client to do the actual website display. So I ended up using the JavaScript API, instead. I found that works great. However, more extensive documentation of the APIs would be quite useful. I had to glean a lot of the how-to knowledge from Google and comments from other users.

On the Mobile Side: I found that, once I figured out the hidden features, I was able to get the app working great. There were a few hiccups along the way. 1) Not all the CL1Lib files are listed in the documentation. Pubnub-CodeNameOne-3.7.2.cn1lib and json.cn1lib are listed in the documentation. (actually -3.7.1 is listed, not 3.7.2). However, these won't link on the server build. You also need to include: BouncyCastleCN1Lib.cn1lib. Please add this to the documentation. 2) It was not clear where these .cn1Lib files should be copied TO. I assume it was the lib directory in my project but that wasn't clear. 3) Need to be specific about what is needed in the Java build path and how to make this change in the Codename One project. I had do do a little finagling there, too, before it would actually build on the server.

4) Need to note that the Java code will run on the Codename One simulator long before it will run on the mobile device itself. However, I can still say that the documentation (either for CN1 or for PN) doesn't make this very clear at all. That's where I found the issue with the CN1Lib files.

Another thing I wish is that you could copy code out of the code examples on the "Getting Started" pages (such as That would make life a whole lot easier. (!!!) I found I couldn't just highlight the applicable code segments and copy/paste them. I had to do a lot of hunting before I could find some examples I could use. This took a lot of time and a fair amount of extra debugging.

Now for the good news. Once I got past the hiccups, I found that the code seems to be great. I am still in the process of debugging on the mobile devices themselves so the so the jury is out on how well the mobile code actually works. But it looks good so far. In short, I really like your tool package. It rocks. It does have a few "improvement opportunities" though and I hope these observations help with that.

Thanks, Craig R. Lang, Horizon Technologies

Comments to this discussion are now closed!