Programming the Mobile Web : Widgets and Offline Webapps - Platforms (part 5) - Windows Mobile & BlackBerry

2/12/2011 3:52:49 PM

7. LG Mobile

Starting in 2010, LG Mobile is offering on its devices a widget platform supporting the W3C widget standard, a subset of the BONDI APIs, and some LG proprietary APIs.

You can download an SDK at The SDK includes a project creator, a widget validator, a packager, and a widget emulator. The emulator allows us to configure emulation data for the device API, like the gallery or contact list. It also supports a DOM Inspector, JavaScript debugger, and Memory Viewer, as any Firebug developer will want.

An LG widget includes the typical files (HTML, icon, and config.xml files), and a mandatory wgt.dat file for persistent storage. The best way to create them is using the SDK. The LG extensions support the widget object with the preferenceForKey and setPreferenceForKey methods we’ve seen in other platforms. It also supports the openURL method to open the browser, and a localized string framework for multiple languages.

The additions to the BONDI APIs include:

  • Call support

  • Camera support

  • Access to the media player

  • Speed dial manager

  • Contact groups

7.1. Distribution

A wgt package can be distributed for free via the LG Widget Gallery, available on the developer website, or you can upload it to the Business Proposals section to see if LG knows how to make money from your widget.

8. Samsung Mobile

Samsung is a pioneer in widget development, providing widget support from all of its TouchWiz UI devices. TouchWiz is a toolbar on the left side of the home screen where all widgets are installed, as shown in Figure 5. When the user drags your widget to an empty space in the home screen it will appear as a non-full-screen application, sharing the screen with other widgets. If you need more space to show details, you can resize the widget or open a mobile website in the browser. You can see how widgets will be displayed at

The widget platform is cross-compatible between Symbian, Windows Mobile, and proprietary OS Samsung devices. It may also be compatible with the new Bada platform.

Figure 4. Samsung widgets can be dragged to the home screen and they share the available space with other widgets.

The widget platform is based on the W3C package specification and has different property support in Windows Mobile and in the other platforms. Check the documentation for details.

Every widget has an icon that can be one of the following:

  • Long vertical

  • Long horizontal

  • Square

This icon will be available in the lefthand scrolling list of widgets. Every widget also has a first depth size (the normal size when the user activates the widget) and an optional second depth size (for more detailed information). You can update the information displayed using a timer and maybe an AJAX request to a server.

Samsung’s widget platform supports the widget object with some known features, such as the key/value storage we’ve already discussed, the openURL mechanism, and a widget.window.resizeWindow(w, h) method to resize the widget so there is more space on the screen.

Starting with Samsung Mobile Widget SDK 1.2 the platform supports full BONDI APIs, so it will be easier to port between platforms.


If the Samsung widget is running on the Symbian OS, it also has full support for WRT APIs for calling all the Platform Services. These are not compatible with the Windows Mobile and Samsung OS devices on which the same widget can run.

8.1. Distribution

The .wgt file can be served from your code as application/ or can be installed by any other offline method. You can also distribute Samsung widgets in the U.S. and Europe via the Samsung Apps official store, by registering as a seller at for a fee of $1 (yes, one dollar). You will receive a 70% revenue share.

If your widget is free, you can offer it globally using the “More Widgets” feature available on every compatible device. You can also submit a proposal to the Market.Dev section of the website to receive business feedback from Samsung.

9. JIL

Joint Innovation Lab (JIL) is a joint-venture company created by China Mobile, SoftBank (Japanese carrier), Vodafone, and Verizon Wireless, covering more than 1 billion customers worldwide. The company has created a widget engine that works on a variety of devices.


JIL offers a widget porting engine to automatically port Symbian, Opera, and Dashboard widgets to the JIL widget standard, uploading your original package to the website.

You can download the SDK for Windows or Linux from the official website, Each operator should use its own trademark for widget development; for example, Vodafone 360 uses as the end-user website and for the developer SDK and documentation.

JIL uses a modified W3C widget API package standard with a .wdgt or a .wgt extension served as application/widget. It supports the Dashboard Widget object with the cross-platform methods and some widget event handlers. JIL also supports the Opera CSS conditional query extensions and a new conditional for touch devices, -o-touch.

A typical config.xml file will look like this:

<?xml version="1.0" encoding="utf-8" ?>
<widget xmlns="" id=""
version="01.00.Beta" height="150" width="100">
<name>Widget Example</name>
<icon src="icon.png"/>
<access network="true" localfs="true" remote_scripts="false"/>
<content src="main.html"/>
<feature name="" required="true"/>
<feature name="" required="false"/>
<billing required="true"/>

The widget engine supports a JIL JavaScript API with the following modules:

  • Telephony

  • PIM

  • Multimedia

  • Device (including File and Application)

  • Messaging

The framework includes a Charging API for payment processing and usage authorization. You can distribute your widget for free or as premium content. You can also use the JIL Advertising Program for monetizing.

At the end of 2009 many vendors announced that they would support JIL, including RIM, LG, Samsung, and Sharp.

At the time of this writing, JIL widgets can be distributed in the Vodafone Store for free or as premium content. The widgets will soon be available in the other operators’ stores, and possibly other independent application stores. You can sign the application from the JIL website before posting it to the stores.

10. Opera Widgets

The Opera browser also has a widget engine that works in desktop and mobile environments using the same widget package. An Opera widget in the mobile environment works with Opera Mobile (Windows Mobile and Symbian) and with the optional runtime (Widget Manager). In 2010, Opera announced that the widgets will also work under the Opera Mini engine, so widgets should soon work on almost every device on the market, from low-end devices to smartphones.

Some operators use this platform to offer widgets to their users along with the runtime or browser that comes preinstalled on devices purchased from those operators. That is the case with T-Mobile, for which Opera has developed a widget engine with additional APIs, including integration with the idle (home) screen and access to the devices’ features.

You can download the Opera Widgets SDK and the T-Mobile Developer SDK from, and you will find the documentation at

Opera uses a ZIP package file with .wgt extension, served as application/x-opera-widgets. Its config.xml configuration file is very similar to the W3C standard:

First Opera Widget

In JavaScript, the widget object exists with the now well-known openURL and the preferenceForKey/setPreferenceForKey storage mechanism. It also supports a user notification mechanism and the onshow and onhide events.


The Opera Widgets SDK supports a CSS extension for conditional media queries to define different styles depending on the running mode of the widget—application, docked, or fullscreen—using the -o-widget-mode condition.

10.1. Distribution

You can distribute the widget via your own server, in the Opera widget gallery, or through some operators’ stores (like T-Mobile’s). There is also an autodiscoverhead, the browser should detect the widget and suggest the download to the user: mechanism that works when the user is browsing your website using Opera and you want to share a widget. If you define a link in the

<link type="application/x-opera-widgets" rel="alternate"
title="Mobile Web Client" />

11. Operator-Based Widget Platforms

Many providers offer widget engines to operators to serve content to their end users. Two classic browser companies, ACCESS (NetFront) and Myriad (Openwave), offer widget engines for operators and manufacturers, like Opera Mobile.

NetFront Widgets ( is a widget platform whose player is currently available for Windows Mobile 5.X/6.X and Symbian S60 3rd edition devices and will support new platforms in the future. Download the NetFront Widgets Content Development Tools, including a packager and a viewer, from the website.

Myriad also offers a widget engine for low-end devices (available at, but no information is available for developers at the time of this writing.

Qualcomm Plaza ( is a multiplatform widget engine for operators (actually already available through some carriers) that uses the W3C widget standard and a free distribution channel for end users.

Obigo ( created the widget framework that is the base for the LG widget platform.

Finally, Orange created Djinngo (, a Java ME client to install widgets created using JavaScript and a VRML language.

  •  Programming the Mobile Web : Widgets and Offline Webapps - Standards
  •  Mobile Application Security : BlackBerry Security - Networking
  •  Mobile Application Security : BlackBerry Security - Local Data Storage
  •  Themes on Windows Phone 7 Devices (part 2) - Changing the Theme & Detecting the Currently Selected Theme
  •  Themes on Windows Phone 7 Devices (part 1) - Applying a Theme
  •  Programming the Mobile Web : Mobile Widget Platforms
  •  Programming the Mobile Web : Geolocation and Maps - Showing a Map
  •  Mobile Application Security - BlackBerry Security - Permissions and User Controls (part 2)
  •  Mobile Application Security - BlackBerry Security - Permissions and User Controls (part 1) - RIM Controlled APIs
  •  Windows Phone 7 Development : Working with Controls and Themes - Introducing the Metro Design System
  •  Windows Phone 7 Development : WebBrowser Control - Saving Web Pages Locally
  •  Programming the Mobile Web : Geolocation and Maps - Detecting the Location (part 3)
  •  Programming the Mobile Web : Geolocation and Maps - Detecting the Location (part 2) - Google Gears
  •  Programming the Mobile Web : Geolocation and Maps - Detecting the Location (part 1) - W3C Geolocation API
  •  Programming the Mobile Web : Geolocation and Maps - Location Techniques
  •  iPhone Programming : Table-View-Based Applications - Connecting the Controller to the Model
  •  Programming the Mobile Web : Mobilizing WordPress and Other CMSs
  •  Programming the Mobile Web : Server-Side Browser Detection and Content Delivery - Content Adaptation
  •  Programming the Mobile Web : Multimedia and Streaming
  •  Mobile Application Security : BlackBerry Security - Development and Security Testing
    Top 10
    Microsoft Surface RT - The Most Stylish Windows RT Tablet So Far
    Ultrabooks Supertest - The Second Coming (Part 2) : Toshiba Portégé Z930-10X, Acer Aspire TimelineUltra M5-581TG
    Ultrabooks Supertest - The Second Coming (Part 1) : Sony Vaio T SVT1311W1E, HP Envy 6-1006sa Sleekbook, Lenovo IdeaPad U310
    Sony Xperia Tablet S
    The Great In-App Purchase Rip-Off (Part 2)
    The Great In-App Purchase Rip-Off (Part 1)
    You Can Master RAW (Part 4)
    You Can Master RAW (Part 3)
    You Can Master RAW (Part 2)
    You Can Master RAW (Part 1)
    Most View
    iPhone Application Development : Making Multivalue Choices with Pickers - Using Date Pickers (part 2) - Adding a Date Picker
    The HP Virtual Server Environment : nPartitions (Electrically Isolated Hardware Partitions)
    Building Custom Players with the Silverlight Media Framework
    One For All And All In One (Part 3) - HP OMNI 27-1015T, Sony Vaio L Series (Model SVL24116FXB)
    Active Directory Domain Services 2008 : Enable a Group Policy Object Link, Enforce a Group Policy Object Link, Remove the Enforcement of a Group Policy Object Link
    Web Security : Attacking AJAX - Intercepting and Modifying Server Responses, Subverting AJAX with Injected Data
    Create Your Own E-Books (Part 5) - Format Wars, Format Conversion & Apple Steps Forward
    Administering COM+ Security (part 2) - Assessing and Assigning Role Scope, Managing COM+ Security
    Web Blocking
    Cookie D'oh, I Scream
    Samsung Galaxy Camera Review – Part1
    Windows 7 : Protecting Your Computer While Browsing (part 5)
    Migrating to Active Directory in Windows Server 2003 (part 1) - Moving from Windows NT Domains
    SQL Server 2005 : Using Excel (part 2) - Using PivotTables and Charts in Applications and Web Pages
    Windows Vista : Recovering Systems (part 2) - Dealing with startup instability
    Advanced ASP.NET : The Entity Framework (part 3) - Handling Errors & Navigating Relationships
    Installing HP-UX : Software Distributor Background
    A New Lick Of CSS For Old Websites
    Silverlight : Binding Across Elements
    .NET Compact Framework 3.5 : Examining ADO.NET