Monday, November 23, 2009

Reply to an "Android vs Windows Mobile" post

This is a response for the "Windows Mobile vs. Android: WinMo Is Better Than You Think" blog post. That blog post might at first look unbiased but it isn't; the author must have skimmed the android #101 class and missed vital parts.

Multi-tasking - Big advantage: Windows Mobile
"Anyone who has run an Android phone for more than a few minutes should fire up a task manager and have a look. You’ll likely see 20 or more tasks running in the background, not unlike WinMo."
Yes, you will see the applications which consists of services and Activities (ie a Form, Dialog or Window), but the big difference is that those activities are NOT running at the same time as your main activity (the one that is on the front). If you want multitasking, then look at the running services. On WinMo they background applications are still RUNNING, they are consuming both memory and CPU, that is one big difference between Android and WinMo.

"WinMo automatically changes memory allocation based on the needs of each app, and if the system memory starts to get stretched thin, the OS shuts down background tasks automatically."
How is the priotization done? For Android it is a clear priority path, first all activities that are not showing is killed, then it starts killing of services and lastly the activity in the front. On WinMo, it is not soo clear. How will WinMo distinguish an application for checking emails from the Chess application you stopped playing 2 days ago?

The post also forgets to mention that the android framework will bring your activities back into memory after they have been swapped out. That way the user will not notice that an application (or actually activity has been swapped out because of the lack of memory. Does WinMo do anything even close to bring an application back up? No! Android has framework support for making it seamless.

About memory, the Windows Mobile 6.5 (and all older versions) has an application memory limit of 32MB. Shared DLLs will eat up that memory if they have been loaded in a bad way. Please read http://msdn.microsoft.com/en-us/library/ms836325.aspx for more info on how one application can reduce the available memory for another application. It is amazing that an OS in 2009 can have this limitation.

Multitasking on android is a more modern approach than WinMo has (or PocketPC as nothing has really changed). It helps the developer of creating a never ceasing, seamless user experience. I have NEVER had the phone freeze so it has to be rebooted because of a faulty application. That happens on WinMo now and then. Why is it even possible for an application to nuke an OS?

Yes, Android has a big problem with the SD card issue, but comparing that to multitasking is like comparing apples and bees.

Available apps - Advantage: Windows Mobile
"Not a lot of apps are in there yet, which is not surprising given how new the store is to the market. "
iPhone had 3,000 applications after the first month. How many does marketplace have today? 400, 500? It is time for MS to put their money where their mouth is. When iPhone started saying that they have so and so many apps in their appstore, MS boasted that there were over 20,000 apps available for WinMo. But where are they? Why don't the developers deliver the applications to the best place to sell and advertise an application? You also forget to mention that the marketplace has a 10mb limit, what does that do to real games?

"Opera Mobile 10 is as good as any mobile browser out there on any platform, and it is free for Windows phone users. It is so exceptional that HTC has been using it as the default browser on its WinMo phones for years, and with good reason. It demonstrates the quality and quantity of apps available for the WinMo platform"
Android has opera as well, AND a web browser based on the webkit engine (google it, if you dont know it). Opera is a great software, but it does not equal that all other apps for WinMo is great. Im not saying that Android applications are of a higher quality as there are a few ones that will crash and burn but thankfully they dont bring the OS down with them.

User interface - Advantage: Windows Mobile
"Spb Mobile Shell has been out for years, and the latest version is for WinMo what Sense is for Android. The difference is that Mobile Shell is user obtainable, where HTC Sense must be installed on a phone as purchased."
I guess you have missed the other Home replacements? There are several ones that allows the user to custom design their front ends, search in the android market for "Home" and you shall find.

"Android phones with the stock interface are pretty plain Jane, as is the WinMo interface."
It is not possible to say, with a straight face, that vanilla WinMo is as good as vanilla android if you have used the two of them next to each other. None of them of course looks as good as the iPhone.

"The end result is that a WinMo phone running Sense is as good as an Android phone running it."
Yes, Touchflo and Sense are great front ends and really responsive, but as soon as you get one or two steps away from it, you see the ugliness of the old WinMo UI. HTC has done a lot to hold WinMo under its arms, as they have been working mainly on the front end that is the only thing the user sees when looking for a new phone.

Then if someone could explain to me why the HTC Sense is more responsive than the WinMo 6.5 start menu when they are run on the same hardware? I have tried the HD2, and when you scroll up and down in the WinMo start menu it will do some strange jumps, which you cant see when using HTC Sense. Also, there is another problem here with a nice front end over the WinMo UI. The user will use fingers gestures to go back and forth from views to other views (which all modern phones should do),but as soon as you go into the WinMo UI you have to bring out the stylus to check a checkbox or something. Unfortunately the next WinMo 6.5.3 will not fix this, as just increasing the size of every control isnt the solution.

Computer desktop integration: Advantage: Tie
This section nails it, it all depends on if you are using exchange or gmail. I am a gmail user and Im quite happy, and I know HTC Hero users that use exchange and are happy with it. Of course using gmail on WinMo is now a viable option thanks to the Google exchange synchronization.

Last
I am a software developer that mostly work with the WinMo platform, and it doesnt go a week without me implementing work arounds for some undocumented change in an API. Especially today as the software is targeting Pocket PC 2003 to Windows Mobile 6.5.3. Add Smartphone to the mix and it is even more fun.

For a nice read on the HD2, check this out this review.

Monday, November 24, 2008

Sending WM_WININICHANGE message on device with HTC TouchFlo 3D will crash the device

Today I finally solved a very strange bug in a Windows Mobile project Im currently working on. The bug would only show up on HTC devices, and not our HTC devices we had at our location. After the application was installed and the user started it, the whole device would freeze and reboot itself after a minute or so.

After some digging around, rebuilding, re-installing for way too many times; we found out that if the HTC TouchFlo 3D today plugin was enabled the device would crash. With that knowledge I was able to pin point the location of the failure which was that the installation DLL sends a
WM_WININICHANGE message to refresh the PocketPc Today plugins.

As many
sites and forum posts states, this is the only way to refresh the Today plugins.

::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);

Of course, this is not documented anywhere within MS documentation; and the
documentation that exists states that the wParam isnt used at all (which in fact it is).

It seems that the HTC TouchFlo 3D isnt capable of handling the
WM_WININICHANGE properly, and even just opening the calendar application after that sending that message will crash the device. So if your WindowsMobile application sends that message, I would advise you to look into this. Using the replacement message WM_SETTINGCHANGE does not change anything, the device will still crash.


One solution is to check if the HTC TouchFlo Today plugin is enabled, which can easily be retrived through the regkey
"HKLM\Software\Microsoft\Today\Items\TouchFLO 3D\Enabled". If it is enabled, then do not send the WM_WININICHANGE message.

Tuesday, November 04, 2008

Trying out SimplifyMedia on Debian

I just noticed SimplifyMedia, and wanted to start sharing music from my home media server. The server is running Debian etch (4.0), and there is no debian repository for it (not surprinsgly as it is not open source). Here's a short description on how I got it to work on my Debian machine.

Startup

  1. Download the package from SimplifyMedia Downloads.

  2. Unpack the contents to a folder

    tar zxfv simplifymedia.tar.gz

  3. Install all necessary debian packages to get the SimplifyMedia server running
    aptitude install libavahi-client3 libavahi-common3 libavahi-compat-libdnssd1 libavahi-core5 libc6 libdaemon0 libdbus-1-3 libfreetype6 libgcc1 libidn11 libpng12-0 libssl0.9.8 libstdc++6 libx11-6 libxau6 libxdmcp6 libxext6 zlib1g

  4. First you need to register for an account, start the SimplifyMedia GUI and enter all needed details. After registering close the GUI.

    simplifymedia/SimplifyMedia

  5. Start the simplifymedia server using the newly created credentials

    simplifyserver/simplifyserver.sh -n USER -l HomeTest -p PASSWD -s /home/media/Music/

  6. Now the server will start scanning your folders, and soon publish the location.




Gotchas/Problems

  • I'm using the Winamp plugin on my Windows XP laptop, and many of the files does not played when selected. This is a major issue, but I'm hoping it will be fixed soon.

  • The server did not find all my mp3's, it's currently missing 15% of my files.

  • Even though I'm almost sitting next to the server (using Wlan) the playback stutters sometimes.

  • There is no daemon support, so I need to fix something.

  • The password is shown in clear text when doing a ps aux



Impression
I was more impressed when reading about it than now after I've used it. The problems that it can not find all files, not able to play all files on a client; are a little too much for me to accept. But hopefully it will improve and become something great!

Tuesday, July 15, 2008

Hudson now supports Team Foundation Server

Today I released a plugin that adds support for Microsoft's source control manager Team Foundation Server to Hudson (a continuous integration server). The plugin makes it possible to retrieve files and poll the server to detect changes on a project. If Hudson detects a change, a new build can be started automatically. Hudson will also display the changes that occurred in each build.


Configuring the plugin is easy as it is only requires the server URL and the path to the project. Hudson will take care of the rest, such as creating a workspace and work folder to store the files in.


The plugin supports both the command line client in the Team Explorer package from Microsoft and the command line client from Teamprise. An upcoming version of the plugin will add support for the opentf command line client.

So if you wanted to give Hudson a whirl but couldn't use it because you were using TFS, now is the chance to try it out! For more information about this plugin, check out the wiki. There are also several other .NET plugins for MSBuild, NAnt, NUnit, FxCop, StyleCop and compile warnings. I'm currently working on a plugin that integrates CodePlex into Hudson.

Update: The plugin can be downloaded here, or through the update manager in Hudson.

Wednesday, May 28, 2008

Hudson adds support for StyleCop

Last week Microsoft released StyleCop (aka Microsoft Source Analysis for C#), a tool that analyzes C# code and enforces a certain code style (similar to Checkstyle). The tool will go through all C# source files and mark the code style violations. Now Hudson (a Continuous Integration server) together with the Violations plugin has added support for parsing the StyleCop XML report and display the results for every build.

The Violations plugin displays a trend graph over builds so it is real easy to see that your project is progressing in the right direction (decreasing the number of violations). As you can see the plugin also supports FxCop reports.


Each build will display a listing of the files that are violating the code style, and it is also possible to see the number of fixed (or introduced) violations for every build.


Clicking on a file will display excerpts from the C# code showing the violations.


Setup
Follow the guideline here after downloading StyleCop. Add the <Import Project="$(ProgramFiles)\MSBuild\Microsoft\SourceAnalysis\v4.2\Microsoft.SourceAnalysis.targets" /> to every csproj file that you are building within Hudson. When the VS project is built, StyleCop will store a file named StyleCopViolations.xml [Update, if you are using StyleCop 4.2 enter SourceAnalysisViolations.xml in the project folder. As of now, there is no way to store it elsewhere. The XML file contains all violations that were found in the Visual Studio project.

Hudson Configuration
To configure the violations plugin, enable the "Report violations" check box. If there are several VS projects in the build, you should use **/*/SourceAnalysisViolations.xml as it will find XML files in all sub folders.


After configuration, start a new build to analyze and display the StyleCop results in Hudson. To see a trend graph you need at least two successful builds.

Tips
  • Do not enable all rules, choose those that are valid for your organization and make sense for you.
  • Do not activate too many rules at first, as it probably will generate too many violations. Too many violations may be ignored by your co-workers, as it seems to be too much work to fix them all. When the most critical code style violations has been fixed, increase the number of rules.