Thursday, 24 June 2010

Blackberry Widgets

I've spent the day at Blackberry developer day here in London.

Blackberry 6 will have a Webkit browser and W3C widgets. You apparently have to use their config.xml builder because it adds lots of Blackberry specific things. The output is actually a bloackberry Java application which then has to be signed. It's an interesting approach. Time will tell how easy it really is and how it works. One "gotcha" is that no Javascript is allowed to take more than 10 seconds to run. This is a typical Blackberry thing to do; I can see why they're decided to do it, but it's a very wrong thing to do. How can they say they have a open standards approach when the pull the rug from under the feet of the developer.

Other interesting snippets of information found are:

  • 50% of Blackberry users are now consumers (ie not enterprise)
  • 80% of new Blackberry users are consumers
  • 5 M new users per quarter and many of these are from Indonesia because of the real interest there in BBM (Bloackberry Messaging).

Monday, 21 June 2010

Vodafone Mobile 2.0 conference

For those like me that were unable to attend last week's Vodafone conference in Barcelona the slides are now available and referenced here.

Looks to me like things are now beginning to get going with Vodafone widgets.

Wednesday, 16 June 2010

Mobile Internet Growth

Mobile is undergoing two separate massive growths:

  • Mobile is being adopted world wide. Every second there are 25 additional mobile phones purchased.
  • Within Mobile the switch to using phones for the internet is also growing massively. Spurred on the adoption of the iPhone use of mobile internet is now becoming mainstream
Today there are 4.8Billion mobile phones in use world wide. Just over 1Billion of these are being used for the Internet. Within 2-4 years the number of people using the mobile internet will have doubled to 2Billion. I've just watch the CEO of InMobi saying that there will be 5Billion internet connected phones in a few years. This is on the upper end of estimates, but frankly no-one knows how far it will go. Within 2 years there will be 7B phones in use; how many of these using the internet is not known at all -it could well be as much as 5Billion.

This change is highly significant it will sporn entire new industries and a small number will grow to the scale of today’s Google or Facebook.

Is the mobile Internet any different to the Internet itself? The answer is neither, yes nor no. There is only one Internet; the differences are only in the devices which connect to it. The problem is that mobiles have diverse capabilities and it’s this that makes the challenges for creating a consistent user experience for products installed on these devices. Long term these differences will diminish. Also some approaches taken have made the problem simpler by concentrating on only high end mobile devices. Again long term this may be a correct approach but it does not help today’s 1Billion mobile internet users in any significant way in the near future (2 to 3 years). Although from a commercial perspective concentrating on the high end also means the audience will be the wealthy and this will lead to more profits… certainly in the short term this is not the correct approach. It’s my belief that a company which is going to be successful in the next 2 years needs to cope with all mobile devices not just the high end.

The other issue is where the growth is. Certainly phone adoption growth is now low in the developed world (although mobile internet take up is still strong in the developed countries). India, China and Indonesia are the main growth countries for phone adoption. Added to that, the fixed internet does not have a strong take up in India and Indonesia. For example in India there are only 12M fixed internet users wheras there are more than 450M people with mobile phones. This where the really massive take up of the Mobile Internet is occurring and will continue to occur there is no legacy or expectation set by fixed internet user experience as there is in the west. In countries like China and Russia where both fixed and mobile internet growth is occurring a different group of internet products will appear many based on the more conventional current desktop products such as Facebook and Google.

So the opportunies are massive for the companies that understand the issues facing users and can respond with appropriate software products. This is particularly true in the Mobile only internet world.

This is an extract from my book "Advice for Mobile entrepreneurs" which can be purchased from Blackberry appworld.

Thursday, 10 June 2010

"W3C widgets still 2 years away" says well known app developer

Yesterday I met the head of a big mobile application developer here in London. When talking about widgets he said "well they told us about them some time ago and they're still 2 years away".

I was quite shocked by this and partly because I think there is an element of truth in it. When I think about it, I have been working with WRT technology for nearly 2 years already and with W3C widgets for a little less time and I can agree that 2 years ago I expected them to be mainstream by now; they are not. In fact the only appstore that can install WRT widgets is Ovistore. All other appstores have not added the mime type they need to do to enable their download. The work to add this mime type would take just a few minutes, with admittedly a UI change to say they can accept WRT, plus some testing. Not very significant effort but no-one has done it. I've asked GetJar to do it, I've asked one of the big appstore suppliers to Operators in the far east to do it, I've asked Sony Ericsson to do it (after all they have S60 phones with WRT capabilitiy but their appstore does not accept that type). All I get is we are considering doing it. Why? I am not sure why they refuse to do it - to some extent is lack of inertia or even foresight that this technology will be massive. The problem is there is no Steve Jobs to tell the world about the technology No-one giving it any momentum whatsover.

Meanwhile have the backing of Vodafone, China Mobile and Softbank. This could not be bigger. It's beginning to move. You can submit widgets to JIL which will eventually end up on these operator portal (although currently its only Vodafone360 shop where they go). So it is beginning to start moving, if a little slowly.

Is it still 2 years away from being mainstream? I hope not!

Tuesday, 8 June 2010

Making installable iPhone widgets

A lot of the developer community complain that Apple is closed and propietary and that the only way of installing an app is via iTunes. Both of these statements are untrue and this article will explain why.

It's true that Objective C development for native iPhone apps is proprietary and closed. However, it IS possible to create installable webapps using open standards and Apple's implementation of HTML5 and CSS3 standards surpasses any other vendor by miles. In this sense Apple is more open and far ahead of all its competitors and apps can be installed without iTunes.

Firstly lets explain what an installable webapp is. Its an web application which is run from the home screen via an icon where all the content used comes from local storage. In fact the app can be run without a network connection. The result, once installed, is an app which need not appear any different from an native application, but it was not installed from iTunes. Of course getting to the point of having it installed is a little more involved.

Making an installable webapp requires the use of two iPhone features:
  • HTML 5 application cache which enables the apps files to be installed an accessed locally from the phone
  • "Add to Home Screen" functionality which enables the app to be run from an icon and run full screen
How to use the application cache
Using the application cache is relatively simple but if you make a mistake it can be very hard to debug, we'll explain that in more detail in a moment. First all you have to do is change the tag to look like this...

<html manifest=offline.manifest>

Note the manifest must have a mime type of text/cache-manifest MIME. Without this setting none of this will work and you want get a meaningful error message either.

The contents of the manifest file will look something like this...




A couple of things to note about this file:

  1. It needs to list all files accessed by the document in the cache section
  2. All urls must be relative and obviously from the same domain
OK, so that's simple, but the problem is getting it right, because we all make mistakes and spotting a mistake is really difficult with the application cache. There's two mistakes you can make; either you miss spell a filename or you forgot to reference something which is needed. If you miss spell a filename the phone will try to retrieve that filename and watching the logs on your server you'll see a 404 (file not found). If you forget to reference a needed file then you then the cache will fail to be successfully created and it will end up in the "uncached" state.

So what are the possible states of the cache. The cache can have 5 states:
  • 0 - uncached (error)
  • 1 - idle (ie sucess)
  • 2 - checking
  • 3 - downloading
  • 4 - updateready
  • 5 - obsolete (error)

So 0 and 5 are error states and the rest are not errors. State=1(idle) means the cache is OK and can be used (this is the state when you are offline and want to use the cached content). State=4 means a new cache has been created and can be switched into use and State=3 means the cache is updating via a download.

So as implied above you also need to know if the browser is online or offline this can be found from the following variable:

var isOnline = window.navigator.onLine;

It's also useful to have an offline event listener to set this if the situation changes:

document.body.addEventListener("online", function () {
console.log('The browser is online');
}, false);
document.body.addEventListener("offline", function () {
console.log('The browser is offline');
}, false);

Also you are going to want to know if the system is on the homescreen or not and is therefore running fullscreen.

var isFullScreen = window.navigator.standalone;

All this information is used to determine the state of the applicatin to know if it has been installed or it is still installing and whether or not its running in the browser or its running from the homescreen. Note on the iPad the application actually continues installing even when the browser is not running (proving that the iPad really is multitasking afterall).

To see all this working in action you can install any eyemag on the iPhone or iPad by going to on that device and then clicking install.

Finally a quick gotcha for all developers, there is a limit of 5Mbytes for each domain an app is installed from per device. This number is certainly the case with iPhone 3 and its unclear what the value is for iPhone 4 or iPad as the limit is not published anywhere.

Also be aware that if your code is cached then you cannot change it. To change the code you need to get the manifest to run and application cache refresh. What we do it put a date/time as a comment in the manifest file and whenever this is re-published it will trigger the cache to be updated.

So to conclude it IS possible to have installed widgets on the iPhone/iPad and the open features HTML5 such as application cache make the iPhone/iPad outstanding devices - no other device has this functionality yet.

Sunday, 6 June 2010

Widget Technologies and Distribution

The above diagram summarises the situation with Mobile widgets, the phones/operators they can be run on and how they can be distributed.

Nokia WRT runs on all Nokia S60 phones, although you generally should have a different UI layout on Nokia S60 Ed5 phones (the touch phones). Ovistore accepts these widgets for download for free or for selling. There is currently no concept of signing this widgets. WRT also has a quite detailed API which allows the widget to access the address book, location through GPS, the camera and photo gallery and much more. Joining Ovi store costs €50 and Ovi shares 70% of the sale after operator charges with the publisher. In general this typically works out as ~50% of the selling price because many of your customers will be buying the apps through operators.

Samsung have Touch Wiz widgets for their touch phones and the new Bada phones. They have an appstore called SamsungApps where the apps can be downloaded or sold. Apps have to have a unique ID placed inside the config.xml file. There is no fee for joining SamsungApps. It is possible to sell apps with Samsung, but you have to go through additional proof of who you are to get accepted for selling apps.

Opera Mini 5 announced the capability of Opera widgets a month ago. However, it's release seems to be associated with certain operators and its being released as a result country by country. Currently its not available to the UK and so I cannot see who it works. However, the desktop Opera browser 10.5 for PC does work with these widgets and works well. Note it was also released for the Mac but it does not seem to work even though earlier versions for Mac did work.

The Joint Innovation Lab (JIL), which is owned by Vodafone, China Mobile and Softbank enables widgets for a number of Vodafone devices. Principally this has been for Vodafone360 M1 and H1 devices, but Voda seem to be announcing the imminent release of support for some Android devices and the S60 devices using Opera's widget manager. Submitting apps through JIL is free, although it you want to charge for your apps then you need to purchase a certificate.

I said earlier that I consider iPhone and iPad capable of widgets according my own definition of a widget. There will be a later detailed post describing how to do this using an HTML 5 features called the Application cache which allows apps to install themselves on the device. So these apps can be run on the iPhone and iPad and if you wrap them in native code they can be distributed from iTunes; again a future post will detail how this is done.

Saturday, 5 June 2010

Cross Platform development and scrolling

For me, the whole reason for working with mobile widgets is to get consistency across different handsets and manufacturers. J2ME used to be the big white hope for cross platform development, but although this got a long way, the nail in it's coffin was the release of the iPhone without J2ME support. Even Android based on Java does not usually have J2ME installed. So my opinion is that J2ME's days are numbered even though today it is still the most consistent cross platform development environment. For me, the future for cross platform development is using Mobile Widgets. Still it's early days for widgets and there are some gotchas around for those trying to do use the same code and indeed ui design across all the platforms. The biggest issue I have faced is scrolling; the problem is that iPhone and Android use a different approach to scrolling than other phones or indeed other standard browsers. iPhone and Android usually ignore any scrolling directive in the document and scroll the whole document. The standard technique to having a no scrolling region is to use the CSS directive "position:fixed". This creates a region which does not scroll and then using z-index it enables a scrolling region to go underneath this non scrolling region. This works on all desktop browsers including Apple's Safari desktop, but on the iPhone, iPad and Android phones this directive is ignored. So on the iPhone there is a solution which involves adding an additional javascript file often called fixed.js and giving specific class names to DIVs. This file changes the event processing of a website so that certain DIVs can be scrolled and others not scrolled. The problem with this approach is that the javascript needs to re-implement the kinetic scrolling of the original device.... this turns out quite difficult and it results in slightly jerky scrolling in some cases. For Android I've yet to find anyone that has done a similar approach - in fact the current Android browser is very poor; although I fully expect that all the issue will get resolved within 12 months - Android is catching up but its still behind the capabilities of its competitors browsers such as Nokia, Opera and iPhone.

More mobile widget information tomorrow...

Friday, 4 June 2010

Summary of Mobile Widgets

So what are Mobile Widgets. One way of describing them is "encapsulated webapps" installed on a phone. That is installed html/css and javascript files running on the phone, but not in a browser.

There are various versions of these already in existence:

  • Nokia have WRT widgets which run on all S60 phones
  • Samsung have WIZ UI widgets on all their touch phones
  • LG have similar widgets but are currently very immature
  • Vodafone through Betavine and have W3C widgets
  • Opera Widgets part of Opera Mini 5 (released in certain countries) and in Opera 10.5 (desktop versio)
I'll also exclude some things called widgets which are not widgets. Example are Android widgets; the ones part of the OS. These are not widgets at all according to my definition. They are actually applications whose UI can appear on the homescreen.

And then include other things not called widgets but call them widgets. An example of these are iPhone HTML5 installable webapps. I call these widgets even though no-one else does because they are installed html/javascript/css on the iPhone. There will more about these and how to create them in later posts.

Then there are standards for widgets and everyone is moving towards the W3C standards at different rates. Nokia used a format very similar to Apple's desktop widgets on the Mac but never implemented for the iPhone and now unlikely to be implemented by Apple. Nokia are likely to move to W3C by simply allowing their phones to accept either WRT or W3C formats since the two are very similar.

Samsung and Opera used an early version of the W3C standard to create their widgets. Opera built an Widget Manager for S60 phones and this is being used by various operators such as Vodafone, T-Mobile and Orange. However, only Vodafone is putting real effort into this. Vodafone has gone much further by starting with China Mobile and Softbank. JIL has a widget manager for Android as well as S60 and allows the installation on the Samsung H1 and M1 handsets part of the Vodafone 360 offering. JIL has recently switch on the uploading of widgets in a single format which is internally converted for use on all its associated handsets. The challenge is to write widgets which will run of the variety of handsets. It's not just a matter of different screen sizes; its a matter of different capabilities and bugs in the browser. I will be going into this in more detail in future posts.

Finally there is a standards initiative called Bondi. This is an add on to W3C widgets which allows the widgets to access more phones features such as location and the address book using a Javascript API. Nokia WRT already has all these APIs but not currently in the Bondi format. At some stage someone will be writing a translation layer between Bondi and the WRT API. Meanwhile the other manufacturers are moving towards implementation of Bondi APIs on their phones.

Future posts will go into all these aspects in further details.

What we are about

This is the first blog from

This blog will discuss everything about mobile widgets from where you can find them, to who and how you can create them.