Discussion Board

Results 1 to 15 of 15

Thread: Tips and Tricks

  1. #1
    Regular Contributor
    Join Date
    Mar 2003

    Tips and Tricks - updated

    This thread is for tips and tricks (Symbian C++). Originally only Forum Nokia experts have posted them but now developers can also post good-quality tips & tricks here.

    To post a new tip, simply click the 'Reply' button on this page. The tip will be added as the last item in this thread. In order to keep this thread as clean and compact as possible, please do not reply to the original tips within this thread (the reply function is for creating a new tip only). Instead, send possible corrections or needed edits directly to the person that has posted the tip or trick.

    Feel free also to post links/pointers to good tips&tricks (Symbian C++) published in some other threads here or in some other sites on the web. In order to save space and prevent this thread to grow too long, I may edit and combine some posts together.

    A practical tip. If this thread gets long (hopefully), it will be divided into multiple pages (depending on your account options), which is harder to browse. By increasing under your accout options the "Default Posts per Thread" (Number of posts that are shown on one page of a thread) into e.g. show 40 posts per thread, that problem is very unlikely.

    Some of the posted tip & tricks may be copied and delivered within the Forum Nokia technical library. For example all the existing posts/tips from this thread (plus some others) have now been included into the next update of the technical library to be published next week (week 14 2005).

    Jarkko / Forum Nokia
    Last edited by jaaura; 2007-07-12 at 18:40.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003

    Skip autostart applications

    To skip any "auto-start" applications (badly behaving recognizers) that are normally run at startup:
    Press the pencil key after turning on the phone and hold it
    down until the PIN code query is displayed. This works on all Series 60 devices.
    Last edited by jaaura; 2005-03-30 at 09:19.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003

    Bluetooth device address

    To check your Bluetooth device address type *#2820# in standby screen.

  4. #4
    Regular Contributor
    Join Date
    Mar 2003

    Using HTTP Client API with RConnection

    If you use HTTP Client API, there are no changes to specify any connection preferences. The default preference is to show the IAP selection dialog. However, it is more user-friendly that the IAP is selected only once by the user. The solution is to create a connection using RConnection, where you can define connection preferences as you like. Then you can attach a HTTP session to the connection as shown before.


    // Initiate connection


    RHTTPConnectionInfo connInfo = iHttpSession.ConnectionInfo();
    RStringPool pool = iHttpSession.StringPool();

    // Attach to socket server
    connInfo.SetPropertyL(pool.StringF(HTTP::EHttpSocketServ, RHTTPSession::GetTable()), THTTPHdrVal(iSocketServ.Handle()));

    // Attach to connection
    TInt connPtr = REINTERPRET_CAST(TInt, &iConnection);
    connInfo.SetPropertyL(pool.StringF(HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr));

    // Open transaction...
    iHttpTrans = iHttpSession.OpenTransactionL(iUri, *this, pool.StringF(HTTP::EGET, RHTTPSession::GetTable()));
    RHTTPHeaders hdr = iHttpTrans.Request().GetHeaderCollection();


  5. #5
    Regular Contributor
    Join Date
    Mar 2003

    Avoid hardcoding

    Wherever possible developers should avoid hardcoding of filenames, directory paths, screen size etc.

    Especially do not hardcode certain commonly used directory paths like "c:/nokia/images". It might not be same in all Series 60 licensee devices.

    There is PathInfo API in the Series 60 Developer Platform 2.0, which should be used instead of hardcoding. See an example application: Series 60 Developer Platform 2.0: File Fetching Example_ v1.0

  6. #6
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Tampere, Finland

    Panic reason and code

    If your application generates a panic it will be closed and an error note is shown by the OS: “Program closed:/n%S” where %S is your application’s name.

    To get the emulator/device display the reason and error code for the panic you should create a zero size file named ERRRD (no file name extension) under c:\system\bootdata\

    On device you can use a file explorer application to create the file, e.g. FExplorer.
    On emulator the file should created on your PC’s file system under %EPOCROOT%\epoc32\wins[cw|b]\c\system\bootdata\

    Once this file is created the error note shown by the OS would look like: “Program closed:/n%S/n%S %d” where the second %S is replaced by the panic reason (e.g. USER, KERN-EXEC,…) and %d would be replaced by the panic code.

    Note: the panic reason and code are only shown on this error note; they are NOT logged into the errrd file.

    A quick search in SDK’s help and you will find a hint on the kind of programming error you should be hunting for in your code.

    When reporting an "application crash", on this board or to Nokia Support, please add the panic reason and code to the problem description.

    *UPDATE* For S60 3rd the ErrRd file/folder must be placed under c:\resource\
    Attached Images Attached Images
    Last edited by ltomuta; 2007-03-18 at 14:42.

  7. #7
    Nokia Developer Expert
    Join Date
    Mar 2003

    Some other sources of tips

    Tips by NewLc - http://www.newlc.com/rubrique.php3?id_rubrique=23
    Tips by Symbian - http://www.symbian.com/developer/faq/tips/index.html
    Tips by My-Symbian.com - http://my-symbian.com/7650/faq/index.php

    Please let me know if there are other good sources of tips.

    Jarkko / Forum Nokia

    BTW, earlier there has been questions about the Symbian OS error codes, now Symbian has published a comprehensive list of Symbian OS Error Codes. It is available here:

    and here is thread pointing to loads of additional Series 60 examples http://discussion.forum.nokia.com/fo...hreadid=58412, i.e. to here http://www.cs.helsinki.fi/u/mraento/symbian/
    Last edited by jaaura; 2006-03-16 at 05:51. Reason: URLs for the Symbian website resources had changed

  8. #8
    Regular Contributor
    Join Date
    Jun 2003

    # codes

    A handy list of # codes used on Nokia phones. To use the code, 'dial' the code.

    1. To factory reset the phone use
    then Lock code

    WARNING!!!: you will lose ALL apps, address, phone number, everything, except the ones that come with the OS.
    Also, make sure the phone's battery is fully charged or you'll render the phone useless!!!

    2. To get phones serial/IMEI number use

    3. To get the device build version use
    Last edited by Asheesh; 2005-06-29 at 10:44.

  9. #9
    Registered User
    Join Date
    Aug 2005
    to get warranty information like made, repaired, purchased etc

    Network dependant, generally they impliment any one(AMR), but some times two
    *3370# activate AMR( adaptive multi-rate speech codec )
    #3370# activate EFR(enhanced full rate speech code )
    Last edited by jaymin; 2005-08-16 at 15:28.

  10. #10
    Regular Contributor
    Join Date
    Sep 2005

    Re: Tips and Tricks - updated

    number list in contacts#
    to quick display the contacts's list phone's number.

  11. #11
    Nokia Developer Champion
    Join Date
    Mar 2006
    Helsinki, Finland

    Re: Tips and Tricks

    Uses of Pencil key:

    U can select multiple items by following steps:
    1) Press Pencil Key
    2) Drag the joystick downwards.
    3) Release Pencil Key
    For Ex: In Inbox u can select multiple messages.

    U can use pencil key for Copy and Paste operations too.
    1) Press Pencil Key
    2) Drag Joystick to the left or right direction.
    3) Select copy option
    4) Release Pencil Key
    5) Press Pencil Key and then select Paste.

    Last edited by kiran10182; 2006-07-21 at 07:56.

  12. #12
    Super Contributor
    Join Date
    Jul 2006
    Oulu, Finland.

    Re: Tips and Tricks

    hi all,

    I want to share with you people, the problem that i faced.
    I hope it will be helpfull..

    Without any error your program will give error when you attempt to build your program for release.

    when you try to build for debug it will not display any error, but when you try to build for thumb it will give you following error:

    make[1]: *** No rule to make target `\SYMBIAN\7.0S\SERIES60_V20\EPOC32\INCLUDE\E
    32BASE.H \SYMBIAN\7.0S\SERIES60_V20\EPOC32\INCLUDE\E32BASE.INL', needed by `..\.
    make: *** [TARGETKEYPRESSEXE] Error 2

    Even if your code is perfect, above type of error will be displayed while building for release.

    The error says "no rule to make target E32BASE.H

    The problem is the space appended in the file name :

    eg: for this example
    find the #include <e32base.h > - the space appended in the file name
    caused the error.

    just remove the space and try to build.

  13. #13
    Registered User
    Join Date
    Dec 2005

    E32User-Panic 66 on exit

    If everything seems to work just dandy in your app, but you get an E32User-Panic 66 on exit, consider the following:

    Since the explanation in the docs is a little confusing it can take a lot of hunting to figure out what exactly might be happening. The docs say that the panic is caused "if an attempt is made to insert a cleanup item into a position on the cleanup stack reserved for marking the current TRAP nest level."


    In effect, what is happening is that somewhere in your deallocation code you might have a PushL() being called (whether directly or via a NewL()). But by the time the app is exiting it is out from under the topmost TRAP harness. As a result there is no reference on the cleanup stack telling it where it should "cleanup to" in the event of a leave. Hence the panic.

    The simple solution is to ensure that there is a TRAP around your exit code. And the world will be happy. For greater insight just put a TRAP around your PushL() or NewL() that is actually triggering the panic.

  14. #14
    Registered User
    Join Date
    Dec 2005

    Beware of '%' in strings

    Some of the output routines don't like a single '%' in a string, as in "Humidity: 100%". They may think the percent as part of a format specifier. But if there is nothing to format you will likely get a panic.

    Note that the panic might be different on the emulator then on the phone. In my case, the emulator generated a USER-12, while the phone gave a friendly KERN EXEC-3.

    So when preparing a string for display or logging, replace any '%' with a '%%'.

  15. #15
    Registered User
    Join Date
    Apr 2006
    Delhi, India

    Exclamation Formatting the firmware


    1. Use this only if the problem you are facing persists after trying the *#7370# reset method.
    2. Switch off the phone.
    3. Hold down the GREEN CALL KEY, STAR KEY and the 3 number KEY, ALL TOGETHER.
    4. Keeping them held, switch the phone on. DO NOT LET GO OF ANY KEY, even the power button.
    5. You wont see "Nokia" on the screen, instead a Formatting screen will appear.
    6. That's it!

    (Doesnt work for S60 1st edition, like N-Gage. Wont work on S40, and I havent tried on S70, S80 or S90 phones.)
    I wish I could change the world, but no one gives me the source code.
    And yeah...
    I ♥ Coding

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts