Archive for the ‘mobile’ Category

Device Atlas API and Django-Admob

Monday, January 26th, 2009

I dream of the day when others code to my API and I sip scotch.

Until then I started two new projects working on other people’s APIs this week.

First I’ve taken a swing at re-imagining the Device Atlas Python API. The existing Python API does the job but the exposed method calls are ominous (`getTreeFromFile`? `getProperties`?) and the returned dictionary objects leaves a bit to be desired. There is also a rather large chunk of what I would consider cruft for dealing with typed and untyped properties. The new API looks like this:

Check it out under `deviceatlas` on github.

Second I’ve written a Django pluggable app for AdMob ads and analytics. I coded a simple snippet some time ago - this is more of the full meal deal and sets AdMob cookies and other wonderful things. The backend code is based off the Ruby AdMob Gem. Check it out under `django_admob` on github.

Image Quirks in XHTML-MP 1.0

Friday, December 26th, 2008

At Handi we use the dotmobi ready test to  validate our mobile pages. One criteria used by the test is the HTML DOCTYPE of your page. Getting a perfect score requires setting your DOCTYPE to a mobile compatible type like XHTML Mobile Profile 1.0:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

Link to example XHTML

Different DOCTYPEs can effect the rendering of your document in a browser and some DOCTYPES have known quirks that can throw off even a perfect design. In XHTML-MP 1.0 we’ve found that images are 4px bottom margin - even when the margin is set to 0.

You can easily fix this problem by by giving all images this default styling:

img { vertical-align: middle; }

Related Links: