×
Namespaces

Variants
Actions
(Difference between revisions)

How to send a Web Runtime widget to background

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Automated change of text from Forum Nokia Wiki to Nokia Developer Wiki. (Rebranding))
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Add ArticleMetaData)
 
Line 1: Line 1:
 +
{{ArticleMetaData <!-- v1.2 -->
 +
|sourcecode= [[Media:BackgroundWidget.zip]]
 +
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 +
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
 +
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) -->
 +
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 +
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 +
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20090611
 +
|author= [[User:Jappit]]
 +
}}
 
[[Category:Code Examples]][[Category:Symbian Web Runtime]][[Category:How To]]
 
[[Category:Code Examples]][[Category:Symbian Web Runtime]][[Category:How To]]
 
This article explains '''how to send a Web Runtime widget to background'''.
 
This article explains '''how to send a Web Runtime widget to background'''.

Latest revision as of 02:07, 26 July 2012

Article Metadata
Code ExampleArticle
Created: jappit (11 Jun 2009)
Last edited: hamishwillee (26 Jul 2012)

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

Contents

[edit] 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

[edit] 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 Nokia Developer Wiki page: UID standby phone. UID for S60 5th edition is the same as for 3rd edition FP2 (tested on Nokia 5800 XpressMusic).

[edit] 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);
}

[edit] 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);
}

[edit] Sample Widget

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

This page was last modified on 26 July 2012, at 02:07.
43 page views in the last 30 days.