Showing posts with label s40. Show all posts
Showing posts with label s40. Show all posts

Sep 27, 2013

CurrencyMe: The Power of Nokia Asha Platform

Hi, all

Today I would like to announce my new app CurrencyMe: the perfect tool to follow over 30 currencies rates in real-time.

Based on your local currency, the app displays the conversion rate to other currencies. Pretty useful tool for investors or travellers.

CurrencyMe was developed in order to show off the power of new Nokia Asha Platform, currently represented by the device Nokia Asha 501.

Asha Platform is built on top of CLDC 1.1 and MIDP 2.1.

Regarding user interface, there is a tailored version of LWUIT, which brings interesting new components. LCDUI can also be used.

CurrencyMe is a very simple app, however, it was possible to implement a good set of features, in order to use as many new components as possible brought by Asha platform.

See below the list of all components X features:

PopupChoiceGroup: A new LWUIT component that allows to pick a value from a popup list. It is used for the user to pick the default currency.

FormItem: A new LWUIT component that consists of one or two rows, can optionally receive a main icon displayed on the left and a smaller action icon displayed on the right, and it can be used to trigger up to two actions. It is used in the About screen to display the details of the app, i.e., name, version and vendor.

HeaderBar: A new LWUIT component that allows the user to create a custom HeaderBar which can be added on Form, to create informative and interactive header bars, and has action buttons. It is used to display the screens' title. This component provides a spinner, which makes easy to show that some background operation is in progress, e.g., loading data from the Internet.

GroupHeader: A new LWUIT component that allows to create a header which can be added on Form, and is used to separate a group of items. It is used to group the settings in the Settings screen.

Switch: A new LWUIT component used to quickly switch between two opposite values. It is used to switch on/off automatic data refresh during start-up.

LocaleManager: A class from Internationalization API (JSR-238) that allows apps to retrieve locale information stored on the device  It is used identify device's locale to figure out the local currency.

Formatter: A class from Internationalization API (JSR-238) that allows apps to make use of internationalization services provided by the API. It is used to format the date/time and value of the rates, according to device's regional settings.

Network State Changes: A set of classes that allows to identify the network state, e.g. if there is a SIM card inserted or wi-fi is connect. It used to prevent the user to refresh data in case there is no Internet connectivity.

Besides all these new components, other libraries were used as well:

CurrencyMe is integrated to Nokia Ad Exchange, a private mobile advertising exchange offering access to the top ad networks in the world. It was very is get the app integrated.

Networking ME, a networking library for Java ME platform, was used to implement the access to currency rates service.

To collect data about app's usage and send data to Google Analytics, Google Analytics ME was used for this task.

Besides showing the tools that were used to build this app, it is also important to show the code for it. For that, I decided to provide the app's source code so you guys can take a look. This code is under GPL. There are some good reusable components to work with Record Store, NAX, GA, etc. For these ones, MIT license is applied.

To download the source code, click here!

Hopefully you guys enjoy the app and the source code.

See you in the next post...

Feb 25, 2013

Multiple HTTP Headers for S40: Fixed!

Hi, all

Long time since last time, hah? Sorry! Quite busy!

Back in 2011 we reported a problem on Nokia S40 platform. That time I would like to be able to access multiple HTTP headers of the same type, i.e. Set-Cookie. Unfortunately, I found it was not possible, because of a bug in the platform. It was a shame, since I had to implement a workaround for a feature that I was working on in one of my projects due to this issue.

But now, furtunately, I am here to share that this issue was fixed by Nokia in S40 SDK 2.0, present in the new multi-touch Asha devices.

Skalogir - Update 16th of August 2012

This issue is still present and affects both Symbian and Series 40 devices. After extensive hands on testing, I have updated the categories. The error is fixed on S60 5th Edition and Series 40 Developer Platform 2.0. Any previous platforms are affected by this.

Great, isn't it? I tried it out and it really works. Finally, I was able to implement my feature the way I wanted.

On the other hand, it is fixed only for SDK 2.0. So, if your app still targets older versions of S40, you will have to handle it.

One more time, thanks Nokia.

See you in the next post...

Jun 28, 2012

LWUIT for Series S40

Hi, all

Nokia has done a great job on its Series S40! Of course, they are low cost devices, but they are quite functional and bring good specifications (touch, GPS, Wi-fi, etc). In addition, the design of some of them is very pleasant and thin, for instance, the Asha family. I tried Asha 303, X3-02 and C3-00, and I liked the result!

Other good news is that Series S40 has a powerful Java ME environment. A bunch of JSRs are supported (most of them present in the whole series), specific Nokia API, e.g. Maps API (you gotta check out this one!) and In-App Purchasing, and Nokia IDE (Eclipse-based) and many other tools. Nokia is now releasing its SDK 2.0 for Series S40, along with new devices: Asha 305, 306 and 311. All of them now full touch. 

Now let's stick to the post's title.


Taking the opportunity of the launch of its new SDK, Nokia is also releasing LWUIT for Series 40, a work done with LWUIT team, which built an optimised version of LWUIT for S40 with a number of styling, theming, and functional changes. This version has a total integration with some features presente on S40 devices, e.g. native keyboard and S40 gesture framework. LWUIT for S40 can be used to create applications targeted at Series 40 5th Edition and newer devices.

This optmization has provided some notable changes on LWUIT components (e.g. Form, List, TextArea, TextField, etc) so they can take advantage of platform's features and look more integrated to S40's UX. On the other hand, these changes are transparent to developers. So if you are already familiar with LWUIT's APIs, don't worry!

You can find all those changes and other useful information, e.g. installation and other resources, about LWUIT for S40 in this Wiki page.

The link to donwload is here.

Nokia, thanks for boosting Java ME for real.

See you in the next post...

Dec 6, 2011

Multiple HTTP Headers: No cookie for you

Hi, all

As you may know, HTTP Cookies are mostly used to track sessions between a client and a server. The flow is pretty simple: you access a server and it returns a piece of information (a cookie), which the client stores, in order to send back in every subsequent request. Based on this cookie, the server identifies the client.

Unfortunately, this session management must be handled by the developer, since HttpConnection does not do that automatically. This is achieved in a very simple way and a few lines of code. If do not know how to do it, please learn now here.

According to the example at Nokia's page, session management using a single cookie is very easy. How about two? It should be easy as well. Instead of only one, now you have to store two and send them back.

In a project that I am currently working on, there are two cookies to manage the session. As I said above, it is very easy, right? It should be. I am porting a code from Nokia S60 5th Edition series to S40 6th Edition. This session management works like a charm, but it fails on S40. Any guess? No? Read the post's title again. The answer is:

Series 40 platform devices up to Series 40 6th Edition and Series 40 5th Edition, Feature Pack 1 Lite, and S60 devices prior to S60 3rd Edition, Feature Pack 1 does not support multiple HTTP header. It means that two cookie cannot be handled, because only one is available. Nice, hah?

Long story short, we had to implement a workaround in our server for S40 version, where only one cookie is used for session management. As a consequence of it, this version accesses a no scalable server, since the second cookie was used for load balancer.

W.O.R.A does not work so well on mobile devices.

See you in the next post...