While brainstorming about AIR with some people here in Seattle someone suggested taking applications that are specifically made for the iPhone’s web browser using iui and turning them into AIR applications. One such application that use all the time is the Facebook iPhone application. Since both AIR and the iPhone use WebKit, taking that application and putting it into AIR was relatively easy so I’ve created what I call iuiFacebookDesktop (I know, I should be in marketing). You’ll have remove the .zip extension because I don’t have the AIR Mime type set up yet.
This implementation just uses the mx:HTML tag with the location set to http://iphone.facebook.com with some extra code to handle the custom chrome and the option to make it transparent. Ideally I could take all of the source code for the iPhone application and have all of those files locally installed with the application but going through that code was more time than I had. You’ll also notice that it just refreshes the entire page. My plan is to go through the iPhone facebook code more and call the function that loads the feed information and just refresh that. I’d also like to be able to detect when a new feed item comes in and bubble that up so I can show a notification but detecting changes to the DOM isn’t easily done with AIR so I need to check with the engineering team. I’m going to have some followup posts this week discussing little parts of the application and I’ll also post the source code later this week (I just need to clean it up).
The goal was a quick/easy way to monitor my Facebook news feed items. There are a number of ways to do that but since the interface was so slick on the iPhone I figured I’d just borrow that. It makes a pretty good widget and I think there are some other good iPhone-specific sites that might make good AIR apps.
Also, the icon is a homage to the old Facebook logo. It’s a picture of me that I tried to make look like the old logo. Also, excuse my crappy graphics/icons.
[tags]iPhone, AIR, Facebook, iui[/tags]
TweetRelated posts:
Pingback: Using iPhone Apps as AIR Applications | David Bisset: Web Designer, Coder, Wordpress Guru