Symbian/Printable version
This is the print version of Symbian You won't see this message or any elements not part of the book's content when you print or preview this page. |
The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/Symbian
S60
This page or section is an undeveloped draft or outline. You can help to develop the work, or you can ask for assistance in the project room. |
Introduction
[edit | edit source]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 | edit source]Resources
[edit | edit source]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 | edit source]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 | edit source]- 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).
S60
This page or section is an undeveloped draft or outline. You can help to develop the work, or you can ask for assistance in the project room. |
Introduction
[edit | edit source]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 | edit source]Resources
[edit | edit source]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 | edit source]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 | edit source]- 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).
S80
Introduction
[edit | edit source]Nokias Series 80 is the communicator series which includes 9300, 9300i and 9500. SDKs can be found at Forum Nokia. The 9200 has a separate SDK.
Collection of tips
[edit | edit source]Connection Preferences
[edit | edit source]You should not tinker around with CCommsDbConnectionPrefTableView. The same code that works on S60 may run on S80 but won't accomplish anything worthwhile. Instead you should use TCommDbConnPref with RConnection.
CEikAppUi
[edit | edit source]A class derived from CEikAppUi has some issues with overriding one the ProcessCommandParametersL methods. It was something to do with the return values, at least ETrue didn't work quite as with S60. Will get back to this when i get around to testing again. Could be that ProcessMessageL override didn't go down too well either so if your app isn't starting be sure to check these methods out.
Keyboard layout
[edit | edit source]A quick reference of the keyboard layout in TKeyEvent.iScanCode:
- Esc : 4
- Numbers 0-9 : 48-57
- Plus : 131
- Backspace : 1
- Tab : 2
- Letters a-z : 65-90
- Enter : 3
- Caps Lock : 26
- Left Shift : 18
- Minus : 123
- Left : 14
- Right : 15
- Up : 16
- Down : 17
- Joy Left : 170
- Joy Right : 171
- Joy Up : 172
- Joy Down : 173
- Joy Fire : 174
- Right Shift : 19
- Ctrl : 22
- Chr : 24
- Comma : 121
- Dot : 122
- Space : 5
- Menu : 148
S80
Introduction
[edit | edit source]Nokias Series 80 is the communicator series which includes 9300, 9300i and 9500. SDKs can be found at Forum Nokia. The 9200 has a separate SDK.
Collection of tips
[edit | edit source]Connection Preferences
[edit | edit source]You should not tinker around with CCommsDbConnectionPrefTableView. The same code that works on S60 may run on S80 but won't accomplish anything worthwhile. Instead you should use TCommDbConnPref with RConnection.
CEikAppUi
[edit | edit source]A class derived from CEikAppUi has some issues with overriding one the ProcessCommandParametersL methods. It was something to do with the return values, at least ETrue didn't work quite as with S60. Will get back to this when i get around to testing again. Could be that ProcessMessageL override didn't go down too well either so if your app isn't starting be sure to check these methods out.
Keyboard layout
[edit | edit source]A quick reference of the keyboard layout in TKeyEvent.iScanCode:
- Esc : 4
- Numbers 0-9 : 48-57
- Plus : 131
- Backspace : 1
- Tab : 2
- Letters a-z : 65-90
- Enter : 3
- Caps Lock : 26
- Left Shift : 18
- Minus : 123
- Left : 14
- Right : 15
- Up : 16
- Down : 17
- Joy Left : 170
- Joy Right : 171
- Joy Up : 172
- Joy Down : 173
- Joy Fire : 174
- Right Shift : 19
- Ctrl : 22
- Chr : 24
- Comma : 121
- Dot : 122
- Space : 5
- Menu : 148