Newsletter | Advertise | App Shop | CONTACT   
     
Tuesday, October 14 2008  
Welcome to SymbianOne - symbian OS, UIQ, series 60 programers, S60, wireless developers, device makers, and mobile industry architects
Home arrow Reviews arrow Creating an S60 3rd Edition Screensaver
HomeNewsJobsArticlesReviewsEventsMagsAbout UsLBS
EVENTS Nokia World 2008 / NAVTEQ LBS Challenge
Free IT Wireless / RCR Wireless News / Total Telecom / Symbian Search / N95 Blog / Symbian Blogs
SymbianOne Newsletter

Symbian newsletter
 Subscribe to the free SymbianOne Monitor Newsletter - 2X A Month!

remove
subscribe
SymbianOne



or Register HERE

SymbianOne Sponsors


Featured Event


2-3 December 2008
Centre Convencions Internacional, Barcelona

Join us in exploring, shaping and defining our industry.

Thought-provoking seminars, keynote speakers, interactive experiences, legendary party!

Visit Nokia World for more info.

Main Menu
Home
News
Jobs
Articles
Reviews
Events
Mags
About Us
LBS

Sponsored Events
symbian smartphoneshow 2008
NewsFeeds


Symbian one RSS feed Add the SymbianOne RSS feed to your reader 

Get daily email updates:


by FeedBurner

 
For The Developer

AT & T devcentral
 AT&T Developer Program - Mobile Application Development Best Practices

Free White Papers

Device Gallery


Nokia N91

post a job

Symbian Careers
FREE Job Posting!

FREE STUFF

 

 

SymbianOne Stuff!

Mobile Application Store 

 SymbianOne Mosh

Need A Wireless Developer?... Post Your Free Job Listing in our Career Center Today!
Creating an S60 3rd Edition Screensaver Print E-mail
Written by Daniel Rocha   
Tuesday, 05 September 2006
In this short article Daniel Rocha, of Forum Nokia, explain how a screensaver is written for S60 3rd Edition devices, such as the Nokia N91, Nokia N73 or Nokia 3250.

Applicability

This article examines how to build screensavers for S60 3rd Edition devices; if you want to create a screensaver for S60 2nd Edition, there's a good example here: Series 60 Platform 2nd Edition: Screen Saver Example, from Forum Nokia.

Creating the project

The first thing you need to do is create .mmp and bld.inf files for the project. In our example code, we have:

bld.jpg

bld.inf file

It's important to specify the DEFAULT GCCE directive: it instructs the build system to use the free GCC compiler instead of the commercial RCVT 2.2. As you're probably building this with CodeWarrior Personal or Carbide.c++ Express/Developer, you'll what to use GCC because it's the only compiler available.

mmp.jpg

ExampleScreenServer.mmp file

Some points worth noting are:

  • Setting the TARGETTYPE directive to PLUGIN: this is new for S60 3rd Edition and specifies that you're building an ECom plug-in.
  • 0x10009D8D is the ECom dll Recognition UID, while 0x01EF299A is our unique dll UID.
  • The CAPABILITY is also new to S60 3rd Edition, due to the Platform Security feature. Unfortunately, due to the ReadDeviceData and WriteDeviceData capabilities requirement, you won't be able to write a screensaver without having a Developer Certificate bound to an ACS Publisher ID, because only those DevCerts have the extended capability set required by the screensaver plugin framework.

Plug-in registration resource file

As screensavers are now ECom plug-ins, you'll need to create a registration resource file, called ExampleScreenSaver.rss, that looks like this:

reg.jpg

ExampleScreenSaver.rss file

Important points in this file:

  • dll_uid and implementation_uid are our dll UID. interface_uid comes straight from the screensaverpluginintdef.hrh file and identifies this plugin as a plugin to the screensaver engine.
  • display_name is the friendly name which will be displayed in the device's Themes application when you configure the current theme to use your screensaver (see more details below).

The source code

You need to inherit your screensaver class from CScreensaverPluginInterfaceDefinition, which implements some ECom construction/destruction code and in turn inherits from MScreensaverPlugin, which defines the actual interface you will implement in order to make your screensaver to perform the actual job of, well, saving the screen :)

Here's like the header file will look like:

header.jpg

ExampleScreenSaver.h file

The important functions you need to implement in order to have real funcionality in your plugin are:

  • InitializeL(MScreensaverPluginHost *aHost): This is will be called once, when the plugin is initialized for the first time, and it will pass you a pointer to the plugin host (MScreensaverPluginHost class), that you can use for important things like: requesting the backlight to be turn on or off, setting the timer refresh value, setting the active display area (so you save power only activating screen areas where you're actually drawing something), among others.
  • Draw(CWindowGc& aGc);: This will be called each time the refresh timer expires, passing you a CWindowGc graphics context that you'll use to perform the actual drawing of your fancy animations.
  • HandleScreensaverEventL(TScreensaverEvent aEvent, TAny* aData);: Here you can handle some screensaver events that interest you. See the TScreensaverEvent class documentation in the S60 3rd Edition SDK for more information.

Here are the implementations of these functions in our example:

code1.jpg

code2.jpg

ExampleScreenSaver.cpp excerpt

The last thing you need to do is to export a function that provides the mapping between the UID of the implementation and its respective creation function. This is pretty standard ECom code and it's documented in our ImplementationProxy.cpp.

Building, packaging and installing the example

That's the easy part: if you're in Carbide.c++ or CodeWarrior, just perform a full rebuild of the project. If you're building it from the command line, just cd to the group folder and type the command:

abld build gcce urel

This will build ExampleScreenSaver.rsc and ExampleScreenSaver.dll files, which will be copied to \resource\plugins and \sys\bin\ folders in the device, respectively.

Now we're going to create the .sis file that will be installed on the phone. Again, if you're using an Symbian aware IDE, the .sis file will be built (and signed, depending on your configuration) for you automatically. Otherwise, you must cd to the sis folder and build the package, by typing

makesis ExampleScreenSaver.pkg

which will build a ExampleScreenSaver.sis. Prior installing, you need to sign it by using the following command

signsis ExampleScreenSaver.sis ExampleScreenSaver.sisx your_cert_file.cer your_key_file.key

where your_cert_file.cer is your Developer Certificate, see the "Downloads and additional information" section for more information, and your_key_file.key is the private key file for this certificate.

Installing your screensaver on the device is easy: just transfer it via Bluetooth, USB (using Nokia PC Suite) or downloading it over the Internet.

Your screensaver in action

The following series of screenshots shows you how to activate your screen phone within the Themes application on a Nokia 3250 device:

Screenshot0010.jpg
Go to "My own"

Screenshot0011.jpg
Click on "Themes"

Screenshot0013.jpg
Select the current theme and choose "Edit" from the "Options" menu.

Screenshot0015.jpg
Configure your screensaver as the default for the current theme

Here you can see our little screensaver running on a Nokia 3250 device:

Conclusion

Well, that's pretty much it. All you need to do is: build your screensaver as an ECom plugin, derive from CScreensaverPluginInterfaceDefinition class and implement the virtual methods from MScreensaverPlugin, build the whole thing, copy generated files to the right locations on the device, and you're done.


If you have any questions to ask or corrections to make, just post a comment here on Daniels blog Rawsocket.org

Downloads and additional information

Daniel Rocha
Forum Nokia Technology Expert
Rawsocket.org

Last Updated ( Tuesday, 05 September 2006 )
 




Google
 

Contribute to the SymbianOne Symbian Search!

Mobile Technology Blogs

 
blogger.gif

Mobile Technology Blogs, News, and RSS Feeds... Looking for more news, tips, commentary, and blogger discussions? Check out these excellent feeds for more on wireless technologies and mobile application development. Got a feed to share? Please tell us about it...

SymbianOne Sponsored Links and Events

Smartphone Show, 21-22 October 2008, Earls Court 2, London - The 10th annual Smartphone Show promises to be the best ever with more opportunities to see innovative technology in action and meet the key personnel driving it. 

iPhone Live - November 18, San Jose, CA - iPhoneLive is the new O'Reilly conference for iPhone developers, entrepreneurs, and enthusiasts, focusing on both the business and development issues surrounding the iPhone platform.

Nokia World 2008, Barcelona Spain - With thought-provoking seminars, informed keynote speakers and a wide range of interactive experiences, Nokia World 08 can inspire anyone and everyone with an active interest in the business of mobility. December 2-3, 2008

Orange Partner Camp, Cape Canaveral, US, 15 - 17 Dec 2008  - For 72 hours, over 50 key Orange employees and over 300 third parties educate, discuss, inform, experiment, develop and even commercialise there and then. 

 LBSZone.com - for developers interested in mobile location-based services
Geospatial & LBS News - Stay abreast of geospatial technologies with daily updates

See Your Message Here

Featured Symbian Career

Featured Careers...

ADDED EXPOSURE FROM SIMPLYHIRED - POST YOUR JOB FOR 30 DAYS FOR JUST $49!

Post your Symbian Career Ad for free at SymbianOne!





Visit the  SymbianOne MOSH

Syndicate


WINKsite
add to google reader
Subscribe in NewsGator Online
SymbianOne Feedster
Technocrati
SymbianOne Bloglines
AvantGo

SymbianOne on AvantGo!
Get Daily Updates!


SymbianOne FeedBlitz

Popular Stuff!

Industry Events
October 2008
MTWTFSS
29
30
1
2

Must Read Articles

Symbian Tools & SDKs

UIQ


News and Blogs

Top of 

Page

(c)2003 - 2008, SymbianOne - All rights reserved