You Are Here:

Community: Wiki

This page was last modified on 11 June 2009, at 09:10.

How to send a Web Runtime widget to background

From Forum Nokia Wiki

This article explains how to send a Web Runtime widget to background.

Contents

Send a widget to background manually

On S60 devices, users can always switch from an application to another, or go back to the standby/home screen, by:

  • using the "menu" key on their device
  • selecting the "Show open apps" item from the "Options" menu of any application

Send a widget to background programmatically

Starting from first Web Runtime version (WRT 1.0), widgets can start other installed applications by using their UIDs, via the openApplication() method.

So, in order to bring a Widget to background, it's possible to use the openApplication() method to launch the standby/home screen application by using its UID. Since the standby/home screen application is always active, it is actually just brought to foreground, bringing the launching WRT widget to background.

UIDs of standby/home screen are listed on this Forum Nokia Wiki page: UID standby phone. UID for S60 5th edition is the same as for 3rd edition FP2 (tested on Nokia 5800 XpressMusic).

S60 3rd edition FP2, S60 5th edition

UID of home screen for S60 3rd edition FP2 and 5th edition is 0x102750F0. So, the following method will bring the home screen to foreground, and the launching WRT widget to background:

function goToBackground()
{
widget.openApplication(0x102750F0);
}

S60 3rd edition FP1

Some S60 3rd edition FP1 devices, through firmware updates, support WRT Widgets. UID of standby screen in this case is 0x101fd64c. So, the previous method is modified as follows:

function goToBackground()
{
widget.openApplication(0x101fd64c);
}

Sample Widget

A sample widget, for S60 3rd edition FP2 and 5th edition devices, is available here: Media:BackgroundWidget.zip

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
User Rating: qfnZuserE5FratingQNx5E2E0000X