MicroViews: Now with Android goodness

I have just released MicroViews for Android onto the development version. This is some very basic work but it is the start of the process so that I can start refining the functionality.

Thanks to the fact that the Android browser is based on a version of webkit, this means that it was quite easy to port the code which creates the iPhone view across. All that I had to really do was perform a couple visual tweeks so that it fits in with the Android style.

Currently the Android views don’t show any image previews in the coverflow style that exists on the iPhone version but I hope this will change soon. The key issue here is dealing with the landscape event. On the iPhone it is possible to detect a change in orientation through JavaScript. On Android I believe that it is possible to disable the screen reorientation completely if you put your phone in to landscape. What this means is that I need to modify my image coverflow so that it will function correctly in both landscape and portrait.

Making this modification may pay dividends for the iPhone view as well. Currently the image navigation component is relying on a gesture detection library, but getting the sensitivity setting of the library right is proving to be tricky. In a landscape view I would possibly rely more on buttons to navigate as opposed to using gesture functionality.

There is another slight caveat that I found about Android. This cold possibly be down to my lack of experience with the platform, but the history component that I used for the iPhone view does not appear to work. The component works by appending fragments onto the end of URLs. Fragments are like query strings except they are preceded by a # and when appended don’t force the browser to reload the page, but they do usually leave an entry in the browser history. This means that the back button on the iPhone version will go back to the previous page of MicroViews as opposed to straight back to the original page. On the Android browser this does not appear to work at the moment. I need to investigate further to see if this a case of the fragments not getting entered into the browser history, or the back button on Android does not behave in the expected manner.

Leave a Reply

Your email address will not be published. Required fields are marked *

*