A Nokia 7650, a S60 device.

Introduction

edit

Nokia's S60, formerly known as Series 60, is a mobile platform based on Symbian OS. S60 includes a wide range of phones with varying capabilities. Most of these phones are made by Nokia, but S60 is also licensed to some other cell phone manufacturers, like Panasonic and Samsung. For general information about S60 see the article in Wikipedia.

The platform comprises of various libraries and pre-installed applications. Platform is open (but not open source), so 3rd parties can develop applications for it. Nokia offers software development kits for S60, and a list of SDKs can be found at Forum Nokia. Especially if you plan to use the newer SDKs you'll need Carbide.vs.

Collection of tips

edit

Resources

edit

S60 resource definitions can sometimes be pretty tedious to write, because of the total lack of proper documentation. The best place to look for information about resource definitions is examples, found in the Series60Ex directory of the SDK, but they too are far from perfect.

  • CAknMessageQueryDialog

One control totally missing from the examples in some SDK version is CAknMessageQueryDialog, which is actually quite useful and once you know how, very easy to use. Here's how to define a working resource for this:

RESOURCE DIALOG r_messagequery_dlg
  {
  flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
  buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
  items=
    {
    DLG_LINE
      {
      type = EAknCtPopupHeadingPane;
      id = EAknMessageQueryHeaderId;
      control = AVKON_HEADING
        {
        label = "The Heading";
        };
      },
    DLG_LINE
      {
      type = EAknCtMessageQuery;
      id = EAknMessageQueryContentId;
      control = AVKON_MESSAGE_QUERY
        {
        message = "The Actual Text";
        };
      }
    };
  }

Note that both the header and the message text can be set dynamically from code. The following code, however, uses the values given in the resource:

CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog;
dlg->ExecuteLD( R_MESSAGEQUERY_DLG );

Camera

edit

On at least, two phones the support for the old RCameraServ has been dropped. If you link your app against cameraserver.lib it will not start on a 3230 or a 6260. Instead you should use the new CCamera class.

CFbsBitmap

edit
  • Transparency

When using newer than 6.1 SDKs (note: not sure if 9.1 still has this), loading the alpha channel (mask) of a PNG into a CFbsBitmap of color depth EGray16 doesn't work. You must use a colordepth of EGray256 for the mask, otherwise MiuoConvertComplete will always return with an error. After the conversion is complete you can convert back to EGray16.

  • DataAddress()

On the new 9.1 SDK a call to CFbsBitmap::DataAddress() causes a crash if it's not preceded by a call to LockHeap() (remember to call UnlockHeap() when you're done with the address).