Dec 27

I am always impressed, or down right amazed at what some of the developers are doing out there.

psx4iphone has been released:

The long-awaited Playstation emulator for iPhone has just gone public! Version 0.1 is now officially available via Installer.app and manual installation via the link below. Psx4iphone allows you to play Playstation (psx) ROMs on your iPhone. Ahh the memories. The zodttd forum also has a few threads that may be useful. This thread is home to a growing list ROMs known to be compatible with psx4iphone and a pretty comprehensive FAQ thread is maintained in this thread. The existing Gameboy and NES emulators for Apple’s first mobile handset are definitely fun but psx4iphone kicks it up a notch. Do you remember how annoying it was to come home to your NES after playing Playstation all afternoon at your buddy’s house?

Dec 25

iPhone Snow Globe

Apple has put up some sample code that shows off the new window.onorientationchange and window.orientation ability that lets you detect the orientation of the iPhone.

You setup your HTML with a body tag with the class of “portrait” or “landscape” and most of the CSS goes from that. You also put an empty div with the id of currentOrientation that is used for some of the magic.

Below is a simple JavaScript handler:

window.onorientationchange = function() {
  /*window.orientation returns a value that indicates whether iPhone is in portrait mode, landscape mode with the screen turned to the
    left, or landscape mode with the screen turned to the right. */
  var orientation = window.orientation;
  switch(orientation)
  {
 
    case 0:
        /* If in portrait mode, sets the body's class attribute to portrait. Consequently, all style definitions matching the body[class="portrait"] declaration
           in the iPhoneOrientation.css file will be selected and used to style "Handling iPhone or iPod touch Orientation Events". */
        document.body.setAttribute("class","portrait");
 
        /* Add a descriptive message on "Handling iPhone or iPod touch Orientation Events"  */
        document.getElementById("currentOrientation").innerHTML="Now in portrait orientation (Home button on the bottom).";
        break;  
 
    case 90:
        /* If in landscape mode with the screen turned to the left, sets the body's class attribute to landscapeLeft. In this case, all style definitions matching the
           body[class="landscapeLeft"] declaration in the iPhoneOrientation.css file will be selected and used to style "Handling iPhone or iPod touch Orientation Events". */
        document.body.setAttribute("class","landscapeLeft");
 
        document.getElementById("currentOrientation").innerHTML="Now in landscape orientation and turned to the left (Home button to the right).";
        break;
 
    case -90:  
        /* If in landscape mode with the screen turned to the right, sets the body's class attribute to landscapeRight. Here, all style definitions matching the 
           body[class="landscapeRight"] declaration in the iPhoneOrientation.css file will be selected and used to style "Handling iPhone or iPod touch Orientation Events". */
        document.body.setAttribute("class","landscapeRight");
 
        document.getElementById("currentOrientation").innerHTML="Now in landscape orientation and turned to the right (Home button to the left).";
        break;
  }
}

And, since it is Christmas/insert your winter holiday here, there is a nice sample snow globe that you can shake by changing the orientation of your iPhone.

Have a great holiday period, and try to stay off of your phones and spend some time with the family ;)

Dec 24

Shai Almog has written about developing Android code tips using Netbeans, which offers his thoughts after porting the bean-properties project to the platform. bean-properties allows you to do things like:

Property<Integer> x = PropertyImpl.create()

First, one of my main problems with Android was the lack of some core Java SE classes that made compiling code to Android rather difficult.

This seemed like a huge porting problem until I realized: “Android is not Java…”. I then started placing the missing classes within my project in the java.* packages and javax.* packages and compiling my code against my own mockups. E.g. Android is missing java.awt.Graphics, which I don’t really need for the general functionality but I do need it for compilation. So I just created the java.awt.Graphics class and stub methods which allowed me to compile my code in a portable way.

I would appreciate something like “Android for MIDP developers” and “Android for Swing developers”, since the guys at Google seem to have changed so much in the naming convention area. So here is a basic cheat sheet for Swing/MIDP developers that I hope some people can build on:

View - Component for Swing or Item for MIDP developers. This is the basic visual element in Android.

Layout - Unlike Swing layouts or MIDP layouts the layout is usually a container, so you add View’s directly to the layout (a layout IS A View).

Adapter - this has no MIDP equivalent. This is closest to a Swing model with the addition of a renderer of sort. So in Android both concepts of a model and a renderer are unified. Android will ask the Adapter for a view which it uses to render the model information, it will then return the view to the Adapter for “recycling” which seems odd for Swing developers used to the renderer concept but it makes some sense.

Dec 18

Joe Walnes is a great open source developer who works on mobile fun in the Google London office. He just released a new iPhone interface for Picasa:

I had a look around some websites and I really liked how they looked on the iPhone. I could get to everything I needed. I went to picasaweb.google.com but it didn’t quite feel right. It was using some very cool AJAXy features, but these were designed with a desktop web-browsing experience in mind. So the next day I had a go at creating a new interface for Picasa Web, designed for the iPhone.

Today, I’m happy to tell you that we’ve just released this new iPhone interface for Picasa. After you go to Picasa on your iPhone and log in, you can quickly see all your albums that you’ve uploaded to Picasa Web. If you click on any of the albums, you can get a full view of your picture with comments from your friends. Or you can click on Slideshow, sit back and watch the pictures scroll. You can also search for photos in your album or through community photos. Finally, with one of my favorite features, you can view your friends’ albums through favorites.

Picasa iPhone

Dec 17

Nikita Ivanov writes about grid computing, which you normally associate with big iron. However, Nikita has written about grid computing with Android, and how, with power mobile phones, the largest grid out there could be the cell phone market:

I heard this idea probably 3-4 years ago when somebody mentioned to me that the biggest grid in existence is the grid comprised of all the cell phones out there. Think about it: every cell phone acts as a grid node, it has certain (albeit minimal) processing power and can easily communicate with any other cell phone in the world peer-to-peer (well, in practical sense, almost easy). And there is a special class of grid tasks that fits this type of grid perfectly: hyper-parallel grid tasks - the tasks that can easily split into thousands or even tens of thousand small micro-jobs where each such micro-job can take 2-3 seconds to get delivered onto processing device and spend another 5-10 seconds on it to get processed and send optional result back.

Now, back 3-4 years ago there were several obvious problems in this picture:

  • Phones were hopelessly underpowered and worked performed by a grid of hundreds of cell phones could easily be done by a single workstation
    • Not so today. Phones are quickly getting more and more powerful and there is a class of tasks that can fit naturally into this profile (like human image recognition, for example).
  • Connectivity was so slow that it basically negated the whole parallelization effect as grid would have been spending all its time in communication
    • Not so today. 3G phones are (finally) getting to US and within 2-3 year will dominate the phone market. With 3G connectivity – the problem is basically solved as you are getting your office type of connectivity on your cell phone.
  • Phones had proprietary system APIs and development of the uniform grid middleware was very hard if not impossible all together.
    • Not so today – and that’s the key.

Can you feel your battery sucking away as it tries to find aliens?

Dec 13

I am at JavaPolis in Belgium, and Sun is taking the prime time of its keynote on JavaFX to talk about mobile. Tim Kramer started off with the usual “Java is on bazillions of devices” slides, and then talked a lot about how open sourcey they are.

It got interesting when Angela got up to give demos using NetBeans (Tim made a nice “Eclipse is painful” remark) that included a SVG Makeover of an app, and pointed to many other apps on the ME Application Developers community.

This page describes the “SVG GUI Makeover” of an existing lcdui.*-based application called “Local Business Search”. More information and the full source code of this application can be found
here as part of the Mobile Ajax Project

The Local Business Search application consists of three screens: The query screen, the result screen, and the map screen. The Yahoo! Local web service is used to search and retrieve business information that is then displayed in the application. We leave the underlying logic untouched but rework the application UI using SVG and JSR 226 technology.

With SVG and JSR 226 many improvements are possible. We can start by replacing the existing screens with SVG-based screens and add simple animations. Next, we can improve the usability by employing SVG techniques to create animated components such as scrolling lists and transitions. Finally, we can enhance the UI flow by utilizing overlays and transparency.

Not all of these have been implemented at this time. Currently, the code focuses on replacing the lcdui.*-based screens and using animations and a scrollable and zoomable list to improve the application UI and usability. These changes alone results in a dramatic improvement of the application and should give developers a good idea what is possible and how to get started in reworking their own content.

Additional changes and enhancements will be made over time.

SVG Mobile Makeover

Dec 12

Simon Judge points to the LiPS and Androis/OHA Faq, which outlines the similarities (unity) and differences (open vs. ad-hoc standards) between the Linux Phone Standards, and the Open Handset Alliance.

LiPS Open Standards Position

Dec 11

Ronan has a nice article on how SVG is perfect for Mobile. He thinks that it is well suited because:

  • It is a compact way of representing vector graphics
  • SVG graphics (in keeping with the name) can be scaled to arbitrary sizes, removing some of issues with screen dimension proliferation on mobile devices
  • It is an open standard
  • Device support is better than you might think (more on this later)
  • Because SVG is based on XML, many existing XML tools can be used to generate content.

The article moves on from the “why” and gets into the “how”. He discusses the device support, when you should use it, and finally shares his testbed application.

SVG-T is a very useful tool in the mobile web designers toolbox. Device support is already quite widespread and getting better. While many older devices don’t currently support SVG, the types of device that deliver a good enough mobile web experience that people actually use them are the very devices that do support SVG. So, with some exceptions (Opera Mini and the iPhone) the pioneers, taste-makers and early adopters are reasonably well covered. So go forth and experiment.

Dec 11

The Open Handset Alliance, a group of more than 30 technology and mobile companies, is developing Android: the first complete, open, and free mobile platform. On Monday 17th December we’ll be hosting Dick Wall from Google’s HQ in California for a special session about the platform. Dick will provide a technical overview of the Android architecture with an emphasis on developing real-world applications.

You will need a wireless enabled laptop to take part in this event. Refreshments will be provided, but places are strictly limited.

Reserve your seat here.

Dec 10

Resco MobileForms Toolkit 2008 was released today, optimized for .NET Compact Framework 3.5 and featuring a slew of new controls and features:

Bratislava, Slovakia — December 10, 2007 — Resco, a leading provider of advanced developer components and tools for mobile devices, has today released Resco MobileForms Toolkit 2008 optimized for Microsoft Visual Studio 2008 and the .NET Compact Framework 3.5.

See the company’s press release for more info.