Home Software About

News on Hungarian Dictionary

Written by Peter on Thursday, January 26th, 2012

Hungarian Dictionary (also known as Magyar szótár), my first app for the Windows Phone platform has been released 5 months ago, it's time to take a look at the numbers. Today the download counter is at 2200, that may be considered low, but the target audience is extremely limited. Windows Phone has a marginal market share in Hungary – still, 70% of downloads were originated from Hungary, the rest were from various countries. I've got 94 really positive reviews so far, mostly 5 stars, which puts it to the top 5% (and top 50) of the Hungarian Marketplace, making it one of the most popular free apps. There are new downloads every day, people seem to like it and use it frequently; this makes all the hard work worthwhile. After two updates the current version is 1.2 and now it includes the Bing translator that can handle 36 languages.

Usage is shared between the following device types, follow the legend clockwise...

Share of Windows Phone 7 device types using the Hungarian Dictionary app
Share of Windows Phone 7 device types using the Hungarian Dictionary app

I consider the application done, which is a great feeling because in my career it's really rare that I can say such thing to software I wrote, most of them always need constant updating, new feature requests come, redesign, refactoring, you know the drill. I must note that I'm still satisfied with Windows Phone, I thought that once Leslie gets her iPhone 4S, I'm going to feel jealous and get one as well. The truth is, in everyday use the two platforms are equally good, so for now I stand by my choice. And for the first time, I have mobile internet connection so I can use it for really useful things, like Foursquare check-ins... :-)

Update: During the past few weeks since I wrote this, apparently there has been a big boom in Hungary. Mobile providers must have started selling the Nokia Lumia 800 and 710, because since then the download counter went over 2700 and most of the new users own these devices. It feels good to be useful.

WP7 Marketplace Submission Procedure

Written by Peter on Friday, September 16th, 2011

If you're an active Windows Phone developer, or you're thinking about joining, you may have thought about what's happening to your application once you submit it to the Marketplace. This is the scenario of my latest app update, your mileage may vary but this is what you can expect in general.

1. You upload your application to the App Hub. Their system processes your XAP file and looks for obvious problems. If there is an issue, you will be notified about it and you have to upload a new XAP file that has been fixed to continue the submission.

2. Once the XAP is verified, they repackage it and you can enter various metadata on each of the supported languages of your app, such as short and long descriptions, keywords, images in various sizes and up to 8 screenshots. It's best to have these all prepared before you start submitting your app. If you actually use special features like network connectivity, device information or phone user identity request, access GPS data etc, these will be detected in your application's code and displayed on the profile page of your application on the Marketplace. For some of these there will be an extra confirmation page displayed to the customer.

3. When you filled the metadata and selected the price and the countries where your app will be available, you're done, the app is "signed and encrypted". Now you just have to wait, a lot, to have it certified.

4. Unless you submitted it really early, the app will be tested the next day by manual labor in Microsoft's User Interface Lab in Norristown, Pennsylvania. They test it with a variety of devices (like the HTC T7575 (7 Pro) and Samsung SGH-i917 (Focus)) plugged onto a PC, running various OS versions, today these are 7.0.7392 (NoDo) and 7.10.7720 (Mango).

5. About two days later, if everything was okay during their tests, they run another test by installing the app over wifi directly from the marketplace storage, then the application will get certified and you will receive an email with a title like this: Congratulations! AppName has successfully passed certification for Windows Phone Marketplace. Now you can publish the app, unless you selected automatic publishing on getting certified.

6. The marketplace content gets refreshed once a day, at 2am in US Eastern Time. If you got your congratulations email (and published the app) before that, it will appear in the marketplace soon. Otherwise you will have to wait yet another day to get it published.

You won't see download and crash statistics showing up on the App Hub for quite some days, but don't worry, it doesn't mean that nobody cares about your app. This information gets processed with a delay of 6 days, refreshed at 8pm in US Eastern Time. User ratings appear quicker, in about an hour or so. On the App Hub you can view these only by selecting single countries to see if there is anything to see there, it's awful. You may use AppTracker instead to follow your applications and see all the user ratings and reactions.

Hungarian Dictionary

Achievement unlocked: Published your first Windows Phone applicationWritten by Peter on Thursday, August 18th, 2011

Yay, I've been published! No it's not a book, it's my first Windows Phone application that went live on the Marketplace. That's one giant leap for me, one small step for mankind. :-) It's an English-Hungarian and German-Hungarian dictionary which works from a locally stored database. Select the dictionary type you need, then just start typing your word and it will filter the results for you on the fly. Tap on a word to see its translations in detail, you can even add it to your favorites. Check out the screenshots as they pretty much speak for themselves (although they are hard to hear in this size) then I will tell you about the challenges I had with this project.

Screens of Hungarian Dictionary app for Windows Phone
Screens of Hungarian Dictionary app for Windows Phone

First of all, I got my phone a few weeks ago and I haven't had any experience with the OS before. Let alone writing an application in Silverlight which was new to me, however it's not all that different from what I'm working with on a daily basis: ASP.NET and Windows.Forms but still, it needed some adjustment. I started with watching the superb WP7 Jump Start videos of Rob Miles and Andy Wigley, they are very cool chaps and I can say, very efficient teachers.

I was thinking what I should do as a learning project and this dictionary just felt right for this platform from every angle. I've created its predecessor in 2009 for Windows Mobile 5.0, it was a dinky little PDA application for my own use, but the most important part of it, the dictionary database files were done so I didn't need to put energy into that, I could start with basically rewriting the dictionary handler class to make it a bit more efficient and use internal caching for the search as you type method I was about to build into this new app.

Then I had to bite the silver bullet with creating a user friendly GUI that embraces the Metro design language, respecting the user's theme settings of dark / light background and chosen accent color, but still look good and having visible graphic buttons in each case. First I was thinking of using a panoramic layout but as it turned out the pivot layout is a better choice for the app's needs.

I ran into some problems and bugs, too... Silverlight has a ListBox control which was a great choice for the job of displaying search results, first it was all fine and dandy, especially in the emulator. But running the first version on my actual device revealed that my dictionary searching is blazing fast, but then the system keeps waiting for the ListBox control's shockingly slow rendering to finish. Alright, starting over, let's create my own ListBox control that actually works with more than 5 list items... Frankly I expected a bit better performance from the standard one. Then I had to deal with the shortcomings of my solution, two dynamically generated TextBlock controls in a StackPanel for each word, with click detection, hosting the whole bunch in a ScrollViewer... At least it's way faster. Obviously, pivot panning and list scrolling shouldn't register as unintended item selection. And it shouldn't be scrollable if there is no need to scroll due to the small number of items displayed. This issue might be solved in Mango, the emulator doesn't scroll, but on the current OS release it sure does. Anyway, it was great fun to work out all these issues.

I was almost ready when I decided that beside the Search, Translations and About pages I will add a Favorites & History handler page. I'm glad I did, it turned out to be a very cool feature, but my application already handled the Deactivated - Activated states and it kept crashing away when I tried to come back to the Favorites page from Tombstoning. Only one 3rd party application can run in the same time, when the app is not active due to running some other program that takes the screen away, my app practically gets killed (this is called Tombstoning), then it will get reloaded if you get back to it. It could reactivate on the other pages, but not on Favorites. It's becoming a known error, with 3 pivot pages it's perfect, but if you have 4 (or more) then on the third page reactivation will be fatal if you try to select your active pivot page in the OnNavigatedTo event handler, where it would be perfect because you couldn't see the first page popping in for a moment. Bit daft... Hopefully it will get fixed someday.

At this point I already had localized text on the user interface, showing Hungarian text if that's the selected system language, it will be supported by Mango so I can prepare for it. But there is a way to localize the application title and tile title too, so in order to make the app as good as it could be, I solved this issue, I even made a tool to help with this task in the future. And since I was there, I added the ability of selecting the user's own default language, even before the Hungarian language gets supported in the system.

Cherry on top of the sundae, I created the Windows Phone version of Moonbase, my class library of reusable functions helping out with often needed stuff like localization, file management in isolated storage, Style / Brush / Font selection, theme detection and whatnot. It will come handy in my next app.

Go and check out the app if you need such a thing, or just try it out for the fun of it; it's free!

Windows Phone Marketplace website


If you're not familiar with Windows Phone, take a glimpse at its look and feel... Lovely, isn't it?

Windows Phone Mango

WP7 AppResLib DLL Generator

Written by Peter on Wednesday, August 17th, 2011

Nice title, I know... Chances are you won't be interested in this, but someone dropping by from Google or Bing will be grateful for what I offer here. As it happens, I couldn't let my shiny new gadget feel alienated, so I paid off the Microsoft Tax and registered as an official Windows Phone developer, which allowed me to unlock my phone for building applications for it and even do live debugging. I already finished my first app and I have some general best practices to share with you about localization.

My application supports English and Hungarian languages, there is a localization solution in the framework but I didn't use it, I went with a WP7 version of my own that I use in ASP.NET applications. It works from an XML file where each string has a name like ModuleTitle and an arbitrary number of child nodes with language code names (en, da, hu etc) and localized content strings. It doesn't matter here, you solve it any way you want. However, there is only one way to localize the Application Title (in the application list) and Tile Title (when you pin it to the home screen) and it's not exactly easy.

In short, you need a resource-only DLL file for each language you want to localize your application for, with two Title strings in each. Generating these resource-only DLL files is quite annoying, especially that you have to do all this typing and renaming all the time whenever you need to make changes, so I made a little tool that does it for you. It works from a project configuration XML file you create with the supported languages and localized strings, which will be inserted into a DLL template file I made without any debug information and 32 characters long placeholders for both Title strings. Just check out the downloaded tool's files, it has a readme, a sample project xml file you can edit and a list of Microsoft assigned Locale IDs you need to use.

After generating the DLL files, copy them into the root directory of your project and add them. The normal AppResLib.dll is the language neutral version, the MUI files are the localized versions. Make sure you open Properties on each of these and set the Build Action as Content so it will be included in your project properly. They will be copied into the XAP file on build, but you need to refer to these resources to actually use them. Open the project properties and see below how you need to set it up:

WP7 application title localization properties
WP7 application title localization properties

As you can see, you have to set the Application Title as @AppResLib.dll,-100 and the Tile Title as @AppResLib.dll,-200 where the numbers are strictly set resource IDs. Sure you can enter these into your WMAppManifest.xml file which you will need to edit anyway before you would release your app.

What you also must set is the Neutral Language of your application. Normally this will be English so you have to set it as plain English, not 'English (United States)' or what have you. If you don't follow this to the letter, you won't see any problem while testing your app, but you will get this error message when the App Hub processes your app's XAP file while uploading it to the Marketplace:

The [NeutralResourceLanguage] attribute is missing on the entry assembly. (2003)

With all these done, your app will work like a charm with the locales you support. If you don't support eg. Italian, you don't have to include the DLL for that language with English titles, in my app I included only the Neutral, US-English and Hungarian files and it's all fine that way. As I see the phone will use the US-English version as a fallback setting if you select a locale you don't support, the Neutral goes unused. Enjoy the generator, I hope it will make your professional life a bit easier.

Update: I had a little oversight in localization. I went for my own string translation solution which is fine, but if you want your application appear in the Marketplace with localized metadata for the supported languages, you must go with the standard localizaton method as well, otherwise you can enter the metadata (description, keywords, images, screenshots) only on the app's neutral language. In my case all I needed was creating a new Resource file for the main project, naming it AppResources.resx (neutral language), then another one named AppResources.hu-HU.resx. I put a test string in each, closed the project, opened the project's .csproj file and entered hu-HU into the SupportedCultures XML node. After this, when I uploaded an updated binary to the Marketplace, it allowed me to enter metadata for both supported languages. It's possible that this last entry on its own controls the supported languages in the Marketplace, but it's not something I want to experiment with.

Resource DLL generator for Windows Phone application title localization. Requires .Net Framework 4.0

New Phone In The House

Achievement unlocked: Got your first smart phoneWritten by Peter on Friday, July 8th, 2011

A couple of weeks ago, after a long debate, I got myself a new phone: an LG Optimus 7. I don't really need a smart phone, but being a fan of Microsoft technologies, I didn't want to wait any longer to jump on the Windows Phone 7 bandwagon. I'm really impressed so far and whatever I don't like in the system is most probably going to get fixed or improved in the Mango update coming this fall. I plan to write about the system a bit more elaborately, but I want to make this post a tribute to my previously used phones.

It won't be a long list. Since I never had too much money to waste, I have always tried to buy things I really need and would use happily for years to come. This is the 4th phone I had in over 11 years and given that it's only two weeks old, I think I've got a rather impressive track record here. I have friends who changed their phones several times a year; if we haven't seen each other for a while, they always showed up with a different phone. Sometimes even in a different car. Let me show you my lineup...

I bought my first phone, the Nokia 3210 in 2000, along with a Vodafone prepaid SIM card. I think this model was a new development then, internal antennas seemed to be a big thing. I had no idea, never even used a mobile phone before but I liked its overall design. It was certainly more modern than what some of my colleagues had around that time, not to mention how badly beaten up those were. Yep, they worked in marketing and sales positions with company issued phones, programmers didn't get one. Not that I cared, I could afford it so I went for it and used it happily for nearly 4 years. It had very low resolution monochrome display, no internal memory to speak of and it was somewhat bulky, but still slimmer than most of the devices in that period. I still have it and it works prefectly, apart from a badly aged battery.

The Nokia 6610 came to me as a birthday gift from my friends in December 2003. I didn't plan to replace my 3210 but it was really sweet from them (and it had to be really expensive!) so I was glad to have it. It was one of the first phones that featured color display, a 128x128 pixels, 4096 colors one that journalists praised on. It was nice indeed, I uploaded a cute Jodie Foster picture as background and it was there until I replaced the whole phone. It didn't go bad, although in its last year I decided to replace its keyboard and shell because it was a bit worn, the paint came off here and there and some buttons didn't register well anymore. Otherwise it was working fine.

Then it happened... In January 2008 I literally fell in love with the Sony Ericsson K610i. I wanted it real bad, just for its looks, I still think it's the prettiest ordinary phone ever made; the finest example of sleek industrial design, like the sexy androids from Asimov novels. A thing of beauty; check it out for yourself from multiple angles. The screen is gorgeous and its capabilities easily put it into the class of smart phones, but these days we think of those as large multi touch screens and software platforms with application stores, so I classify it as an ordinary candybar phone. Honestly I still don't expect more from a phone and I still love it to bits, so it took me a while to convince myself to get a new one.

I can take care of my things so well that natural degradation doesn't really control my purchasing habits. However, during the years I got an iPod mini 6GB (2005) and a Mitac Mio P550 Windows Mobile 5.0 based PDA (2006), both good as new and they all have properties that are missing from the K610i. It can play music just as good as the iPod, but doing so really compromises battery life, plus I hate to use a headphone jack converter with it. The PDA has GPS navigation and can be programmed using the .Net Framework, but it's not always with me so its usability is limited. The K610i had a camera (a front facing one too, in fact) but the image quality is a joke. Almost all mobile cameras are a joke though so I don't hold it against the phone. As I don't take my Canon DSLR with me everywhere, it would come handy to have an OK compact camera built into the phone that I can use, should I spot a burning zombie.

So here we are, I took an attempt to merge my devices into a single one and I think I've chosen well. I was thinking of an HTC Trophy 7 originally for its looks, but the LG Optimus 7 was much cheaper with 16GB storage memory instead of 8GB. Then it turned out that even though the HTC looks a bit better, I love the LG's three hardware buttons, and its camera (or at least its internal settings) is like a thousand times better. Somebody at HTC must have called SharpenMore() in a loop and nobody seems to ever test what comes off the conveyor belt there.

The Optimus 7 is a good phone, I like using it on a daily basis. I kept the K610i as a secondary phone, I put the old Vodafone SIM card into it, that I had to abandon a couple of months ago. For some reason I lost the ability to send text messages to the USA, they seem to go out, Vodafone charges for them, but they never arrive. I waited many months for a fix. They have no idea what's wrong, it must be anything but them. I went to one of their shops to get a SIM card replacement; I instantly became quite popular there with my SIM from the year 2000, after 11 years of usage... Unfortunately the new card didn't fix the issue either, so after yet another useless round with their support center I gave up and bought a SIM from T-Mobile. Magically, that works.