Monday, February 18, 2008

SMS Transferring

If you prefer to store messages on phone memory, you will need three phones to do the transfer, otherwise you don't need a middle-phone:
  • source phone - 2nd Ed (ex. my N70),

  • destination phone - 3rd Ed (ex. 6120 classic), and

  • middle phone - 3rd Ed (ex. my E50).

Steps:
  1. On your source and middle phones, set memory card as storage for messages. On destination phone, set that to phone memory. To change the settings, go to Messaging > Options > Settings > Other > Memory in use > [memory card]. You will be prompt to copy message or not. Select yes for the source phone and yes for keep original. For others, up to your preferences.

  2. After the copying is completed, read the memory card with a computer and copy the folder \system\mail\ to your computer (always as a backup). Now, you can put the source phone and its memory card away.

  3. Access the memory card of your middle device, browse to \private\1000484b\. You will find a "Mail2" folder, rename it to anything. Copy your "Mail" folder and rename that to "Mail2". Insert the card back into the phone. Now, you can access all messages, SMS, MMS, Bluetooth and Infrared.. etc, on your middle phone.

  4. Last step is simple, open the Transfer program on both 3rd Ed. phones, set up a sync profile between your destination phone and the middle phone, and synchronize text messsages. Done.

Friday, February 15, 2008

Backup, Restore, XML

By default, backup and restore of application are not supported in S60 3rd Edition. Each application must include a file, backup_registration.xml, to register itself in the backup/restore process. However, none of the examples in SDK provide a good enough registration file - all of them only work for simple applications. Below are some URLs I found these days:

Symbian.com: How-To Write Backup-aware Software
- official documentation on backup and restore. But it's hard to understand and too deep into the underlying but too little about the XML.

Forum Nokia: nokia n95 full backup program
- this is where I start to find some useful information on the XML.

Forum Nokia: How to backup/restore themes in Symbian v.9.x based devices?
- for theme creators. But I wonder, how to put the XML in Carbide.ui Theme Edition 3.2?

NewLC.com: How to enable backup and restore for Symbian OS applications
- the best place to look for Symbian C++ sample codes.

Wiki of FN: Enabling backup and restore for installed C++ applications
- the example in this page is the best so far.


Here is my XML file:
<?xml version="1.0" standalone="yes" ?>
<backup_registration>
<system_backup />
<passive_backup>
<include_directory name="\" />
</passive_backup>
<public_backup>
<include_directory name="C:\PATH1\UID" />
<include_directory name="C:\PATH2\UID" />
</public_backup>
<restore requires_reboot="no" />
</backup_registration>

Friday, January 11, 2008

Small Status Pane

Symbian S60 status pane occupies one-fifth of the screen, which is a lot of space. Programmer can disable it by one of the following methods:
  1. CCoeControl::SetExtentToWholeScreen() (during construction of the CCoeControl). It expands to full screen, but CBA pane is gone and skin background won't work properly.
  2. CEikStatusPane::MakeVisible(EFalse). It hides the status pane, CBA pane remains but the skin background still won't work properly.

The Menu and Web (application) on S60 3rd phone suggest that there should be a standard API which can reduce the status bar but show necessary or critical information. It took me a while to find something useful:
They are same except different in titles and first lines. Based on their suggestion, the simpliest way to reduce the status pane is:
    StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_SMALL );
If you call CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, Rect(), EFalse) after switching the layout, the skin background should work fine in both portrait and landscape mode. Note that in landscape mode, the status pane is already in minimum size. So, SwitchLayoutL might have no effects for landscape.

However, this resource id will only give a blank status pane. If the signal icon is desired, as it's useful when accessing Internet, use R_AVKON_STATUS_PANE_LAYOUT_SMALL_WITH_SIGNAL_PANE. Check out more in the avkon.rsg.


My app with small status pane. Skin background is working. However, it does not display the app title.

If you want to have the same mane pane as the menu, signal + battery + title, use R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT.

Silent the Keytone

This is a summary of post from Forum Nokia: Turning off key sounds programatically. Code can be added to MyProjectAppUi.cpp.

#include <avkon.rsg>

KeySounds()->PushContextL( R_AVKON_SILENT_SKEY_LIST );

To restore, call KeySounds()->PopContext(). One thing noticed, press LSK hear no keytone. When Options menu is displaying, keytone comes back.

This keytone-silent feature should be useful for games, as players might not want to have keytones during a game play but when normal use of the phone. Pressing the key and hearing the beep-beep-beep-beep is kinda annoying. Of course, the sound engines of game might already prevent the keytone beeping.