Tuesday, January 29

Symbian - Application Icon

To set an application icon is so clumsy, once again for symbian. I would have thought that carbide would provide an interface for selecting the bitmap file easily, since it does so with its ui designer component.

But i could not find such an interface. I looked through the SDK, and found the way to specify the icon file in the application resource file. The nokia wiki guide is not helpful, or i have misunderstood its purpose (it is using svg). There is another post for 1st, 2nd & 3rd Ed which is slightly more helpful.

The only one step that i took is:

  1. In MyApp.rss, under LOCALISABLE_APP_INFO > CAPTION_AND_ICON_INFO, add the following line:
    icon_file = "\\resource\\apps\\MyApp.mbm";
But, how to choose the icon within the mbm? It will point to the 1st icon in the mbm file.

A deeper look into mbm file
mbm file is compiled from the mmp file, which specifies the bmp and its mask to use. It looks like the following:

START BITMAP MyApp.mbm
HEADER
TARGETPATH \resource\apps
SOURCEPATH ..
SOURCE c24,1 hometone_icon.bmp hometone_mask.bmp
SOURCE c24,1 call.bmp call_mask.bmp
SOURCE c24,1 checkbalance.bmp check_balance_mask.bmp
SOURCE c24,1 lost_pwd.bmp pwd_mask.bmp
SOURCE c24,1 settings.bmp settings_mask.bmp
SOURCE c24,1 sms.bmp sms_mask.bmp
END

Sunday, January 27

Symbian - Autostartup

It is fairly easy to auto startup an application for Symbian S60 3rd Ed.

Read the Symbian Wiki Guide here, but note that it is not perfect. Here are some tips/correction that you may want to know wrt the steps in the guide:

  1. executable_name = "!:\\sys\\bin\\.exe";
    Use ! instead of c or d as user can install the application on phone memory (c) or memory card (d).
  2. Copy the .rss file to your project's DATA folder
    It is DATA folder, not GROUP folder
  3. ok
  4. I added another 2 lines for the target name and targetpath. It might not be necessary but it works.
    START RESOURCE E17F4056.rss
    TARGET E17F4056.rsc
    TARGETPATH resource\apps
    END
  5. ok
  6. ok
  7. The difference here is the path to E17F4056.rsc. I changed it in step 4 so that i know exactly where it is, else i would have an I/O error when the file cannot be found (it landed up i don't know where..)
    "$(EPOCROOT)\epoc32\data\z\resource\apps\E17F4056.rsc" -"c:\private\101f875a\import\[E17F4056].rsc"

    In some cases (quite a few), the .rsc file cannot be found. It could be renamed as .ro1 instead, which means "TARGET E17F4056.rsc" in step 4 does not work correctly... Hence,
    "$(EPOCROOT)\epoc32\data\z\resource\apps\E17F4056.r01" -"c:\private\101f875a\import\[E17F4056].rsc"
  8. Yipee~

Other links:

This is not the end of the story.

In order to pass the Symbian test criteria, the application must allow the user to disable autostartup. This is fine. But, strangely enough, the Startup List Management API does not have a direct way to disable it!!

There are 2 workarounds described here. I would prefer the later method.


Autostart after installation
It is usual for an application to run right after installation. To do so, add FR, RI to the mmp file. eg.
"C:\Symbian\9.1\S60_3rd_MR\Epoc32\release\gcce\UREL\TestRun.exe"-"!:\sys\bin\TestRun.exe",FR,RI

Tuesday, January 22

Device Databases

Due to the nature of the release of mobile phones, we now have so many different models. I can't count exactly how many there are as another model is released by the end of this sentence!

Many have tried to create a device database that allows developers to use, easing our lives. Below are a few:

Somehow it seems even the device databases is fragmented itself! Hopefully it the future they could collaborate and give 1 great device database. If I will to bet, I will choose WURFL.

Wednesday, January 16

Setting up Video Streaming Server

I have set up a video streaming server 1 year ago. And 1 year later, I again need to set up one for a demo project, but which could also be used later for my hyp. I remember 1 year ago I took quite a long time to find the pieces to fit together.

There are a few steps to get things going:

  1. Install ActivePerl
  2. Install Darwin Streaming Server (DSS)
  3. Start DSS service if not already started - this will run the streaming server.
    You can either start the windows service or run DarwinStreamingServer.exe.
  4. Run streamingserveradmin.pl - this is to start the web admin for configuration.
  5. Go to http://localhost:1220/ to configure your streaming server
  6. At this point of time, you may stream video. Test it out with http://localhost:554/sample_50kbit.3gp. The video files are under this folder:
    C:\Program Files\Darwin Streaming Server\Movies\
  7. You will probably experience this with your .3gp videos created with ffmpeg. The .3gp videos could not be streamed. This is because the video files need to be "hint".
  8. Download MP4Box
  9. MP4Box.exe -hint -3gp myvideo.3gp
  10. Move the hinted copy to the Movies folder. It should work now.

This is how a geek protest

Tuesday, January 1

Technorati blog search API

This is post is for Technorati's spiders. Come get me~ Technorati Profile