Dveloping for windows mobile 5
This is by far my first technical article on this blog.
Yesterday I decided to give windows mobile 5 a try, here is how the experience was:
First you have to install microsoft active sync the latest (4.1-currently)
Then you should install some developing tool that supports developing for windows mobile, I chose microsoft visual studio professional 2005 RTM and the development platform would be Microsoft Compact Framework 2.0
Within visual studio you can choose a new smart devices project then platform it to microsoft pocket pc 2003, yes not windows mobile 5.0, I realized that after a few hours, I don't know why my new imate KJam didn't support that choice, although it has windows mobile 5.0 / CE installed but it seems it is a problem with the resolution or something that prevents the application from starting. Anyways I went with the pocket pc 2003 as a choice for platform.
Then you have to fix your deployment choices, configure your device and choose the folder where you want the application to run on your mobile, you can then start building then deploying.
It constantly failed to deploy microsoft compact framework 2.0, after a while i checked the log file on the mobile set itself, it appeared that there was not enough memory!!!
The KJam set i got has 64 MB as RAM and 128 MB as ROM together with some 1 GB mini-SD card that i bought as an extension.
When deploying the MS CF 2.0 it goes to a fixed choice, that is installation is on the narrow 64 MB which even appears as 49 MB from the mobile as total. Sadly only about 19 MB was free, and the CF was about 23 MB or something so it wasn't possible to install it.
I then kept trying to remove programs, close existing ones, delete messages and contacts :) but no use. I restarted and disabled/removed the antivirus but still.
So I thought of upgrading the ROM, visited imate site to find two ROMs one with arabic support and the other with WWE (world wide english support), I opened a chat session with imate club support to ask about that. I asked why is there a version for arabic and another for english, why not just add support for arabic in the WWE one, but the response was there is no update, patch, language pack that supports arabic under the WWE edition, although there is some program out there that can do it for you and you can purchase it online. Pathetic, I thought having windows and buying KJam would end the unreasonable lack of support for arabic language but seems not. Anyways I tried installing both ROMs, first one crashed while doing it by the book, I thought I lost my mobile as it froze on some coloured screen with lots of numbers on it (ROM, ExtROM and stuff like that).
I thought it is better not to disconnect the USB cable, and try again and surprisingly it succeeded although the crash closed the activesync which acts as the underlying connectivity layer for the update ROM module.
It worked and the update succeeded, you can find that ROM update at (both arabic and WWE):
Clubimate Link
Updates are about 50 MB.
Now I decided not to synchronize my contacts, files and calendar settings before deploying the MS CF 2.0..
It succeeded this time and then i did the synchronize.
A strange thing happened, the mobile crashed upon restart and It froze on the SIM PIN request, no matter what it won't close or proceed, I had to remove the battery and try to open it again to work. It might be the CF or the ROM update, not sure.
Then I deployed my test application, it was a window with a button and a label. Once you click it, the label displays the .net CLR version and the wndows mobile version, Infact I really needed that information to make sure they sold me what they said they did (regarding the OS ver).
It was right, i deicded to expand the functionality to display the name of the mobile operator as the mobile displayed the name of the old one "Click GSM" which I found rather strange as that was the latest SIM and this is a new mobile, how come it cannot display what all other kind of mobiles display "Vodafone EG".
I looked and kept looking for resources about SIM access on msdn, ended up with some sweet sample that uses cellcore.dll
MSDN LINK
It reads what the sim has to say through some COM function call
private static extern IntPtr SimGetRecordInfo(IntPtr hSim, IntPtr
dwAddress, ref SimRecord lpSimRecordInfo);
I wrapped the old 2003 code in a new 2005 project, there is just one task to do, take the static main call to the new phone or project.cs file that is created to you by the wizard.
The new vs 2005 introduces a fact that you shouldn't put your logic code in a presentation layer, so there is a new program or phone file with each project from which you can call and initiate your forms. It has your main static function..
For now I will try to dig deeper and find classes that expose the network cells and how to measure the coverage strength at a certain point, I am so excited about the subject, it seems really working afterall.
Yesterday I decided to give windows mobile 5 a try, here is how the experience was:
First you have to install microsoft active sync the latest (4.1-currently)
Then you should install some developing tool that supports developing for windows mobile, I chose microsoft visual studio professional 2005 RTM and the development platform would be Microsoft Compact Framework 2.0
Within visual studio you can choose a new smart devices project then platform it to microsoft pocket pc 2003, yes not windows mobile 5.0, I realized that after a few hours, I don't know why my new imate KJam didn't support that choice, although it has windows mobile 5.0 / CE installed but it seems it is a problem with the resolution or something that prevents the application from starting. Anyways I went with the pocket pc 2003 as a choice for platform.
Then you have to fix your deployment choices, configure your device and choose the folder where you want the application to run on your mobile, you can then start building then deploying.
It constantly failed to deploy microsoft compact framework 2.0, after a while i checked the log file on the mobile set itself, it appeared that there was not enough memory!!!
The KJam set i got has 64 MB as RAM and 128 MB as ROM together with some 1 GB mini-SD card that i bought as an extension.
When deploying the MS CF 2.0 it goes to a fixed choice, that is installation is on the narrow 64 MB which even appears as 49 MB from the mobile as total. Sadly only about 19 MB was free, and the CF was about 23 MB or something so it wasn't possible to install it.
I then kept trying to remove programs, close existing ones, delete messages and contacts :) but no use. I restarted and disabled/removed the antivirus but still.
So I thought of upgrading the ROM, visited imate site to find two ROMs one with arabic support and the other with WWE (world wide english support), I opened a chat session with imate club support to ask about that. I asked why is there a version for arabic and another for english, why not just add support for arabic in the WWE one, but the response was there is no update, patch, language pack that supports arabic under the WWE edition, although there is some program out there that can do it for you and you can purchase it online. Pathetic, I thought having windows and buying KJam would end the unreasonable lack of support for arabic language but seems not. Anyways I tried installing both ROMs, first one crashed while doing it by the book, I thought I lost my mobile as it froze on some coloured screen with lots of numbers on it (ROM, ExtROM and stuff like that).
I thought it is better not to disconnect the USB cable, and try again and surprisingly it succeeded although the crash closed the activesync which acts as the underlying connectivity layer for the update ROM module.
It worked and the update succeeded, you can find that ROM update at (both arabic and WWE):
Clubimate Link
Updates are about 50 MB.
Now I decided not to synchronize my contacts, files and calendar settings before deploying the MS CF 2.0..
It succeeded this time and then i did the synchronize.
A strange thing happened, the mobile crashed upon restart and It froze on the SIM PIN request, no matter what it won't close or proceed, I had to remove the battery and try to open it again to work. It might be the CF or the ROM update, not sure.
Then I deployed my test application, it was a window with a button and a label. Once you click it, the label displays the .net CLR version and the wndows mobile version, Infact I really needed that information to make sure they sold me what they said they did (regarding the OS ver).
It was right, i deicded to expand the functionality to display the name of the mobile operator as the mobile displayed the name of the old one "Click GSM" which I found rather strange as that was the latest SIM and this is a new mobile, how come it cannot display what all other kind of mobiles display "Vodafone EG".
I looked and kept looking for resources about SIM access on msdn, ended up with some sweet sample that uses cellcore.dll
MSDN LINK
It reads what the sim has to say through some COM function call
private static extern IntPtr SimGetRecordInfo(IntPtr hSim, IntPtr
dwAddress, ref SimRecord lpSimRecordInfo);
I wrapped the old 2003 code in a new 2005 project, there is just one task to do, take the static main call to the new phone or project.cs file that is created to you by the wizard.
The new vs 2005 introduces a fact that you shouldn't put your logic code in a presentation layer, so there is a new program or phone file with each project from which you can call and initiate your forms. It has your main static function..
For now I will try to dig deeper and find classes that expose the network cells and how to measure the coverage strength at a certain point, I am so excited about the subject, it seems really working afterall.

0 Comments:
Post a Comment
<< Home