13.Jul.2010 Fingers and mouse pointers
I see a lot of new stuff that is built on the web that shows off touch capabilities in Mobile Safari. And while that is great most of them is simply broken or send you away if you want to have a peek using your desktop browser (or other mobile browser).
Supporting touch doesnt mean exluding the good old mouse/keyboard users, you can have both! You can even support multitouch, for devices that have it, as long as your application doesnt rely on it.
See this excellent demo for a demonstration.
For developers there are basically three classes of devices:
Mouse/keyboard desktop PC.
Device with touch screen, lacking “Touch API”.
Device with touch screen and “Touch API”.
To make matters worse some desktop browsers, like Chrome, report it has touch API even when its running on a regular dektop PC that ofcourse doesnt have a touch screen. So what I do currently for Orbium to decide if we are running on a touch screen is a pretty big assumption and a hack.
I use the available screen size, if its less than or equal to 1024×768 (the iPad resolution) I assume mobile device with thouch screen. Of course this is not future proof in the least, and I will only get away with this for maybe a year more. So if you have some method of finding out if the user uses a touch screen I would love to hear about it.
Orbium has two control modes “click mode”, and “swipe mode”. Click mode is just click to launch orb, works with mouse control. Swipe mode is touch gestures to launch the orbs. This is needed bacouse of the smaller screen size realtive to your finger. swipe gestures effecively increases the resolution involved, and without it Orbium would not work on mobile devices.
Touch API is needed for swipe gestures? No! Its very possible to emulate this using mousedown, mousemove, mouseup, as long as any kind of multiutouch is not needed. This is how it works when Orbium runs on the Palm Pre or the Nokia N900 for example, that doesnt yet have the touch API.
So promise me for your next mobile project dont leave everything besides iPhone out, it could lead to a similar thing that we had with IE in the past, and the would ofcourse be bad.