November 23, 2007 New Java features of 3rd Ed. fp 2 Posted by Aleksi Uotila at 11:00 AM | Categories: Development

We've announced already the new flexible UI toolkit eSWT in our previous post. eSWT is definitely the most biggest new feature in S60 Java Platform for developers in 3rd Edition Feature Pack 2.

But there's a lot more in the new S60 Java Platform. We have both, new API features and under-the-hood functionality. Below I'll try to list most of the nitty-gritty features. We'll be providing more information on how to use these via Forum Nokia Wiki site, and perhaps cover some in more details in future posts here too. They will also be covered in our reference documentation in Java ME Developer's Library when a 3rd Ed FP 2 version will be available.

New APIs available:

  • Nokia IAPInfo API
  • Device dedicated Media keys (Play/Pause/Stop) access as normal key events
  • Control over End call key (Red call key) behavior for application's lifecycle
  • Enabling device theme background for Canvases for custom component usage
  • Prevention of screen saver via Nokia UI API
  • Foreground/background events via pauseApp/startApp
  • Flip close event for fold/clamshell devices via pauseApp
  • Access to device IMEI, network access type (gprs / csd etc.), network id, network signal level, battery level, country code, date and time formats via system properties
  • LCDUI Canvas Graphics scaling (introduced originally in 3rd ed) enhanced for orientation switching devices


IAPInfo API allows to access device's Internet Access Points configuration and allows to specific explicitly for General Connection Framework network connections (http etc.) which IAP should be used.

New other functionality:

  • Java application startup time is better due to OS on-demand paging and other changes (and as a result you also have more user RAM available).
  • Support for scalable icons (SVG) for MIDlets
  • Support for categorization of MIDlets: game / application
  • Device volume keys will change audio output volume of MMAPI
  • Selection key has a label (as a result LCDUI Commands are more aligned with Series 40 Java)


New architecture

Regarding under-the-hood functionality, the S60 Java Platform has gone through a big architectural change. We've changed the VM from a monolithic architecture to more flexible one. Prior to 3rd Ed fp 2, S60 Java had traditional CLDC VM architecture where all API code (class files) were compiled into the virtual machine executable. Now the Java API implementation code is no longer in the VM executable but will be dynamically loaded when needed.

The new architecture allows us to dynamically extend the virtual machine with new APIs. Which is exactly what is used e.g. in our eSWT implementation. When there will be new releases available from us for eSWT, we'll release that directly to developers. Anyone can install that upgrade package to 3rd ed FP 2 devices. Another result of the new architecture is of course memory saving: applications not needing some of the optional APIs wont have them in memory.

We also have changed the threading implementation. Now Java Threads are native. Each Java Thread has a native thread counterpart. Prior to 3rd FP2 the Java threads used so called light-weight threading (sometimes referred to as "green threads" which is a small misnomer) where Java VM had it's own thread implementation and scheduling. Now Java threads are scheduled by OS.

Runtime performance

On MMAPI we have done performance improvements. In overall the mixing of audio content now works lot better and playback latency is smaller. This means improvements to Java gaming experience. The media deallocation now properly frees the memory and concurrent number of players being in pre-fetch state is increased.

One smaller, but rather dramatic change has been implemented on LCDUI Canvas class. Previously each Canvas instance contained it's own double buffer for graphics contents. The size of the buffer image is the size of the screen so it consumes quite much runtime memory. Double buffering for Canvas is nowadays required feature by MIDP specification 2.1. If a MIDlet has multiple Canvas instances the memory may easily run out. On other platforms e.g. Nokia Series 40 had implemented different double buffering scheme: each Canvas instance simply shared the same double buffer. We at S60 Java decided to implement the same scheme and as a result we are behaving the same with Series 40 devices.


Permalink |

Comments

Will the 3rd Ed FP 2 Java have the same JSRs as previously?

Thanks

Simon Judge

http://www.simonjudge.com
http://www.mobilephonedevelopment.com

Posted by: Simon Judge | November 23, 2007 12:25 PM

Wow! This sounds awesome. Congratulations and well done!

Posted by: Jason | November 23, 2007 02:08 PM

Great... nice to read about new features and stability improvement to Java VM. I was thinking the Java side of things were ignored but you proved me wrong.
Would these be made available to S60v3 FP1 phones like N95, N95 8gb or N82.

Posted by: Bejoy | November 27, 2007 04:11 AM

This is WONDERFUL, the internet access point feature was a major blocker for a Java project in the past and the other features seem like they would provide huge benefits! Well done!

Posted by: Shai Almog | November 28, 2007 07:03 AM

Nice improvements! One really annoying thing has been slow startup time. I would like to show the application title figure immediately in application start up. Any plans for static or dynamic splash screens?

Posted by: Theorold | November 28, 2007 10:35 PM

So is this limited to new devices only?

I have an E61 which I love. It is a near-perfect device for me, except for some rough edges here and there -- of which Java support is one. Better Java support (especially for Gmail and other mainstream J2ME apps) would be wonderful.

Posted by: Ken | January 26, 2008 10:57 PM

TKS,very useful info.

Posted by: Always Online | April 5, 2008 04:19 AM


Post a comment







«Back to previous page