Introduction to Series 40 full touch for developers

Car Race 3D Exercise App running on the Nokia Asha 311We’re kicking of the webinar series for the new Series 40 Touch phones tomorrow! The first session will walk you through the new Java ME APIs introduced in the Developer Platform 2.0.

The packed agenda covers all the important topics that you will need to know about when you’re moving your Java ME apps to the new touch UI:

  •  Introduction
    • Platforms & Versions
  • New features for developers
    • UI
    • LWUIT
    • Text Input
    • Touch Input
    • Sensors
    • Location & Maps
  • App Compatibility
  • Publishing & Monetization
  • Resources
     

The recording of the first webinar session is online for viewing. The downloadable version of the slides is slightly extended, featuring some more details than in the 1h webinar. 

You can download the full source code of all the apps shown during the presentation – the blue text box in the top right corner or the slide always refers to the full example being demonstrated.

JavaME-Touch-Examples-v2.0.0.zip

As a special bonus, the example package and the downloadable slides also include a few exercises (+ the corresponding solutions), so that you can put your new knowledge about the APIs into use right away! The excercises are both based on 3D graphics:

  • In Monkey Touch 3D you’ll add drag & pinch support to view the 3D model of a monkey, and add orientation support to dynamically switch the app between landscape & portrait mode, depending on the physical orientation of the phone.
  • Car Race 3D let’s you extend an endless 3D racing game with support for controlling the car using acceleration sensors, instead of physical keys (which would no longer be availble on the new touch phones)
     

Registration

In different webinars during the following days we’ll also look at the design aspect and the IDEs (both the new Nokia IDE for Java ME as well as NetBeans). Every session is held two times, so that you can join no matter which time zone you live in.

Register for the webinars now!

Optimizing the right thing – power consumption breakdowns

I‘ve promised to come back to this topic in my comments to earlier blog postings and now it’s time to do it. Let me start by telling the very recent conversation between my team member and one of the APAC area cellular network operator. It went like this:
                Nokia: Are you planning to deploy this feature X in you cellular network?
                Operator: Why don’t you rather tell me about your display power optimizations? Isn’t it so that displays are consuming most of the power in the smartphones?

This dialog highlighted the need of telling people that how power consumption breaks down in the device between different use cases. Display is one of the biggest battery drainers but cellular radio also belongs to that same category and therefore shouldn’t be ignored. By reading further this post you’ll notice that display backlights is turned off during phone call and this means 0 mW power consumption for display in that particular use case. That said, no help of display optimisation if you just want to talk longer.

Power consumption breakdown (mW) examples

 

Above we have four different use cases and their power consumption breakdown. Those pie charts are based on real figures from one of the Nokia Symbian device platforms. Some variation occurs between our HW platforms and especially display share can be much bigger or smaller depending on display technology (LCD, OLED), physical size (larger consume more) and brightness settings (backlight dominate display sub system power consumption).  By looking the pies, following can concluded:

-    Typically three most power hungry units are processor, display and cellular radio. Breakdown is always use case specific and shares differ a lot.
-    During voice call cellular modem is consuming vast majority of the power and other HW parts are most of the time in sleep mode
-    Video call over 3G network and Browsing are good examples of the use cases which load the system heavily and basically all three major units are utilized.
-    3D gaming loads GPU and CPU and display and typically modem is turned off (when not playing online game)

But remember, that in order to understand the full picture, we need to know total power consumption of the use case and also how often it is used. Your application can consume 1W power if it is never used but if it is popular and gets used a lot, then even figure that sounds small starts to make sense to optimise.

In Symbian you get total power consumption of the device by running Nokia Energy Profiler (NEP). Good starting point to get ballpark of application level power consumption is to calculate delta when application is running vs. when it is not installed. Nokia Battery Monitor is another way of getting valuable information of how much your application is contributing to total power consumption. Version 2.0 will be soon available and it provides application level energy monitoring.

How much is daily usage then? People spend lot’s of time with popular applications and those will become major shareholder of the device daily energy consumption. At this point energy efficiency starts to show up. 

Controlling access protocols to your project’s resources

When we launched Projects we decided to play safe and configured the Web server and access to all repositories over SSL. Some users have expressed interest in Git over SSH, other users have mentioned how SSL is not a requirement to them and would be happy with normal HTTP.

We started working on our server configuration, but decided that we wanted to allow everyone to decide for himself. We configured Projects so that everything is enabled by default, but project owners are free to configure and limit which protocols can be used to access the resources of a project.

So this is how it works, all project Web sites are now accessible both using HTTP and HTTPS. Although the Web server will default to HTTPS, you can simply specify "http://" in front of the URL and switch SSL off. If your network has a proxy, you should see a performance improvement when you don’t use SSL. In general your browser will cache static files such as images, CSS and JavaScript, so you should have a good performance anyway.

Similarly to the Web site, all repositories can now be accessed both via HTTP and HTTPS. If you had issues with Git over HTTPS in the past you can now remove SSL and avoid recompiling your libraries. If you like SSH better, don’t forget to read how to use Git over SSH in Projects. Last but not least, the WebDAV server can now be accessed with or without SSL.

If you are working in the Open Source you probably don’t worry about protecting your files and using HTTP might be a better option than HTTPS. Please note that when authenticating over HTTP, your password will be sent in clear and a man-in-the-middle might still try to steal it.

A project owner can control which protocols are enabled by visiting the Admin tab and then clicking on Protocols. By default they are all enabled. If you are concerned about security, disable HTTP.

This is how it looks in one of my projects, where I have disabled all HTTP access to Git and only allow HTTPS for WebDAV:

Access protocols admin page

As a user you can choose which protocol you want to use when checking out or cloning a repository. To make life easier we changed the source page a little bit. See how now there are two buttons to choose the protocol you want to use. These change based on the repository type and available protocols.

Git clone with SSH Web UI

 

The same applies to the Files section and the WebDAV protocol.

Using Git over SSH in Projects

From day one we supported three different repositories in Projects, Git, SVN and Mercurial. All of them worked over HTTPS. A lot of us are used to using Git from the command line and SSH is much more convenient as a protocol and is still very secure. In some cases it also offers better performance.

It took us a little bit to configure properly our servers, proxies and make sure that it was secure. We chose gitosis and although we did not tell anyone we have been testing this for a couple of weeks now and it works GREAT!

If you have Git and SSH you don’t need to do very much, just give us your SSH key and allow a few minutes for our servers to sync and then you are ready to go.

Add your SSH key

On the Projects site, go to My projects (login required, of course).

Click on My projects settings.

My projects

Here you have all your preferences specific to Projects. Click on the SSH keys tab.

ssh key tab

Enter a description of the key, your SSH key and press save. If there is ay error you will see a message in red and the key will not be save. The key MUST be 2048 bytes and not more than 4096. Make sure you upload you public key.

 

 

ssh key

After a few minutes you will be able to clone your Git repository.

This is a screenshot of me cloning a test repository.

clone over ssh

For more information see our updated manual on how to configure Git.

Energy saving tips via practical examples

Top 10 energy saving tips is alive again in FN. I cannot emphasize importance of those tips enough and that’s why I wanted to keep repeating myself and link it here again.

Top 10 energy saving tips

We had a webinar on December 2009 in which I highlighted some of the tips via practical examples (in Day 2). I encourage all of you to go and hear those presentations. Other than those tips, there’s lot’s of other relevant battery life information available.

Mobile Internet Battery Life: Challenges/Solutions

In this session, Nokia experts describe the challenges developers
face with mobile internet services’ operating times. This
webinar provides practical examples of typical problems related to
applications that are always online and performing background
data transfers.

Day 1

Day 2

Energy saving tips via practical examples

Top 10 energy saving tips is alive again in FN. I cannot emphasize importance of those tips enough and that’s why I wanted to keep repeating myself and link it here again.

Top 10 energy saving tips

We had a webinar on December 2009 in which I highlighted some of the tips via practical examples (in Day 2). I encourage all of you to go and hear those presentations. Other than those tips, there’s lot’s of other relevant battery life information available.

Mobile Internet Battery Life: Challenges/Solutions

In this session, Nokia experts describe the challenges developers
face with mobile internet services’ operating times. This
webinar provides practical examples of typical problems related to
applications that are always online and performing background
data transfers.

Day 1

Day 2

Color makes a difference

OLED (Organic Light Emitting Diode) displays are here today and people talk of them how brilliant those are. Oh Yes, those are brilliant and now this technology has also entered to mobile devices and therefore it has became relevant to developers who are designing UI SW. When it comes to power consumption, OLED has very unique characteristics vs. TFT(thin-film transistor) LCD’s. Key point being that power consumption varies a lot according to colors of the content in OLED.

We’ve measured 3.2" displays in Nokia with following results:

Figure: 3.2" OLED vs.LCD
displays and power consumption in milliwatts [mW].

All white consumes 14x vs. all black screen in OLED! Content makes also difference in power consumption of LCD display but not that much.

Tip: Optimize colors for OLED. Prefer dark colors. Same optimizations apply today for Nokia’s TFT LCD displays. These are technologies used in all Nokia smart phones.

Color makes a difference

OLED (Organic Light Emitting Diode) displays are here today and people talk of them how brilliant those are. Oh Yes, those are brilliant and now this technology has also entered to mobile devices and therefore it has became relevant to developers who are designing UI SW. When it comes to power consumption, OLED has very unique characteristics vs. TFT(thin-film transistor) LCD’s. Key point being that power consumption varies a lot according to colors of the content in OLED.

We’ve measured 3.2" displays in Nokia with following results:

Figure: 3.2" OLED vs.LCD
displays and power consumption in milliwatts [mW].

All white consumes 14x vs. all black screen in OLED! Content makes also difference in power consumption of LCD display but not that much.

Tip: Optimize colors for OLED. Prefer dark colors. Same optimizations apply today for Nokia’s TFT LCD displays. These are technologies used in all Nokia smart phones.