Tzah 2.0


Archive for the ‘technology’ Category

So you want to develop on Windows Mobile

Monday, May 18th, 2009

Windows Mobile 6.5 is done and that’s a good opportunity to provide a quick jump-start to developers wishing to learn more about the OS.

WM_6_5Microsoft has a tendency to overload developers with abundant API of its various platforms and technologies. Windows Mobile is no different. Managed and native API, .Net, MFC, ATL, Win32… it’s all there for the confused developer. Luckily, Microsoft has recently published an article discussing APIs for Windows Mobile 6 and later, and how to select the best fit for your application needs. BTW, don’t be tempted to choose managed .Net API before fully understanding the functional requirements from your application and the devices it needs to run on. Win32 is better if you wish the application to run on as many devices as possible. 

A good place to learn Windows Mobile development is MSDN’s ramp up which is a community-based learning program, teaching various aspects in development for WM. Another excellent source for learning and help is blogs of mobile gurus. I recommend subscribing to the following blogs: Raffaele Limosaniblog, Alex Yakhnin, Christopher Fairbairn, Windows Mobile team blog, Reed and Steve blog, the Moth, and finally, Chris Craft (especially his 30 days of .Net series).

OK. You’ve done your reading and fill ready to start developing? hold on. Make sure you took into account globalization and localization issues. Simon Judge lists many of them.

Once done development, you need to QA your application. If your application aims for numerous devices in many countries, involving different networks, you should consider using DeviceAnywhere or maybe even Mob4Hire.

Finished the cycle? congratulation! Now you can go and publish your application on Windows Marketplace.

A site for mobile eyes

Saturday, April 4th, 2009

Mobile devices are no longer tools for calling someone. That’s a known fact. You can take pictures with it, read emails, navigate, read web content, check your calendar and more. However, in the mass user eyes, it is still not regarded as an extension to your computer. Sometimes, when I’m outside my home or office, I come across interesting stuff; movie posters, concerts, commercials or even a quick glance at a newspaper’s headline. For example, I can see a poster about  Antonio Gades’s flamenco version of “Carmen” and wish to learn when and where it shows.

Until recently, my mobile options to get this information were limited. I’d have to  open my browser, go to Google and type something like “gades carmen tel aviv”. Then I’d have to go over the results and look for the information I want. That’s very tedious even if you have iPhone.

xsightsLuckily, we have options which are much more fun and easy to use. The first one is Xsights. With xsights solution, the user makes a video call (no need to download an application) and points his camera at his object of interest (poster, news, image, text). xsights understands the image and delivers the user an interactive multimedia response. Currently, the company is focused mainly on newspapers. Mobile readers will point their phone on interesting article and bang, they are presented with in-depth information. For example, point the camera at an article about last night soccer match and get the highlights from the game.  

Nokia Point & FindNext comes Nokia. Nokia has recently launched a beta application called Nokia Point & Find. The application, currently available in USA and UK only and for Nokia N95 models, utilizes the compound of phone’s camera, Internet connection and GPS to recognize a real life object and get information relevant to the context and location. For example, users of the service could get information about movie like reviews, local show times, trailers and could even buy tickets on-line. What I like most about the service is the management portal Nokia provides for publishers. Nokia wouldn’t want to have a dedicated professional service team to configure campaigns. Instead, Nokia’s management portal enables the publishers to do it themselves. What I don’t like is that the application is relevant only to N95 models in the USA and UK. Plus, the user will have to download and install the application. 

Kooaba technology used in Mentos campaign Finally there’s  Kooaba. Koomba is a spin-off company from the ETH Zurich, an outstanding science and technology university in Switzerland. Their technology was already used in several campaigns and looks very mature. Mobile users can send images in various ways: email, MMS, iPhone and J2ME applications, although video calls are not available yet. Publishers can use  a web-based campaign manager to set up their account. The company also offers API for partners and developers.  

Overall, this is very exciting! The products above demonstrate how to use the distinctive benefits that mobile device has to offer to provide new experiences for mobile users and business opportunities for publishers.

C# 3.0: Lambda Expressions, extension methods and Object Initializers

Friday, January 23rd, 2009

I just finished reading Alex Yakhnin’s post about generic control creation for WinForms. This is an excellent article  for those whishing to know how to use some of C# 3.0 neatest features like Lambda Expressions, Extension Methods and Object Initializers.

Alex demonstrate how, using these features, nerd developers like us can make their code more readable and as a result – maintainable. Basically, he used Extension methods to extends Control class functionality to create inherited controllers. One of the arguments used in the extension method is Func<Control, T> build.  This is a in fact a nice way to say that ‘build’ is a function that accepts an argument of  Control type, and has a return a value of type T.

Next, he uses Lambda expression to present the function in an elegant way. The expression is in fact, a constructor for the control we wish to build. As a final ingredient in this wonderful code soup, he used Object Initializers for the constructor.

Hooking to keyboard in Windows Mobile

Tuesday, September 30th, 2008

Let’s say you built an application that need to know when certain keyboard buttons are pressed. Let’s say you need to get such events even while running the application in the background and some other application is running in the foreground. Well, there’s an easy to use native API that does that: SetWindowsHookEx. There’s an excellent post by Alex Yakhnin on how to use and integrate the method to managed application.

However, before using the method, you should consider the following. The method is a private API. Meaning, it can change or even remove in the next CE version. More over, OEMs can decide to remove it themselves. The result is that you have angry customers complaining about your application and you have no idea why. For more information, check this post from Raffael Limosani of Microsoft CSS (Customer service and support). BTW, I highly recommends reading Raffael’s posts. They are very informative and to the point.

So, you read the disclaimers and decide to continue and use the method. Alex’s code is excellent but there’re couple of points you need to consider. First of all, each button press initiates at least two events for the button. The first is for the state where the key is pressed (down). The other is of course, when the button is released (up). I decided to handle the down event in order to catch the event before other applications.

That brings up to the second point. Other programs are also hooking. Usually, you don’t mind. Every time the hook procedure you set in SetWindowsHookEx is called, you do your stuff. When finished, pass the event to the next hook by calling the appropriately named method CallNextHookEx and return its result. However, if you wish to prevent the key event to pass to other hook, then don’t call CallNextHookEx. Instead, just return 0. Blocking other programs from these events is not very friendly behavior so thing carefully before doing it.

On some cases, avoiding the call to CallNextHookEx might not be enough though. For example, the green (send) and red (end) buttons. It seems that the phone application catches events when these buttons are pressed even if you don’t call CallNextHookEx. If you wish to block that as well, have your hook procedure return -1. If you do return 0, expect the phone application to send another key up event upon completion of event processing. Don’t take my word for it. Try it for your self.

Finally, don’t forget to call UnhookWindowsHookEx before closing your application or you’ll get a nasty error about WinCe5011bException.

Are we there yet? I don’t think so

Wednesday, May 28th, 2008

Technology is fast-pacing. It’s all around us. 3G networks are deployed world-wide (although at small percentage of overall networks) and the battle is already on for 4G between LTE and WiMax. The new annunciation of electrical cars is here as an answer for the fuel crisis. Digital photos and web-sharing has only recently (I’m talking years-scale) become common and now we witness amazing ways to combine the two and watch photos. Mobile and VoIP. Need I say more? These two technologies are always revolutionized. VoIP is becoming widespread  in more and more businesses, homes and various vertical markets. Mobile is constantly surprising us. iPhone, Modu, GPS-integrated phones.

But still, we’re not there. Not from an innovation point of view.  It seems that in our vanity and ambition to become leaders in this technology race, we forget something. That something is stability and reliability. Technologies  are evolving but can the family next door use it?

High availability of day-to-day infrastructures and commodities like water, Gas, PSTN lines, electricity and TV is perceived as self evident. We open the TV and “Lost” is on, we click a switch and let there be light.  Why can’t we have the same availability and reliability on more advanced technologies?

Yesterday, was not a good day for me. I woke up late because the alarm in my cellular didn’t work. My other cellular, top of the line HTC TyTN 2 decided to quit charging for some reason. I picked up my laptop bag and found out it’s hot. why? my laptop  didn’t go to sleep mode when I shut it down so it continued to exhaust  the battery while in close bag. I quickly went down to my car, and… Yes, the battery is gone. And on top of things, the chess application  on facebook was going through upgrade.

High-level technology is just not there. Take for example a recent report that demonstrated that only 3 of top 20 most popular web sites achieved the mythical 5 9’s of reliability. At the beginning of the year 4 undersea communication cables were cut crippling international communication in countries like India, Qatar and United Arab Emirates.  These examples are annoying but not harmful (unless you just have to update the entire world on what you ate for breakfast). A much more alarming example of why reliability is important came just at the beginning of this month were a Canadian toddler died after VoIP 911 dispatched an ambulance to  the family’s former home, more than 2500 miles away.

I hope that top-level technology companies will quickly realize that amazing gadgets and cool features are nice, but reliability is more important. Until than, we can only backup our wedding pictures and go outside to real friends the next time that our favorite social network is done.

Jajah is the VoIP player that brought you web-activated telephony.