Tools

Namespaces

Variants

Views

Actions

Search

Contents

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Starting with Nokia N97, '''Web Runtime''' offer the possibility to '''add widgets to the device home screen'''. Home screen widgets allow users to '''view data from multiple widgets without the need to open them in full screen mode'''.

+

Starting with Nokia N97, Web Runtime offer the possibility to add widgets to the device home screen. Home screen widgets allow users to view data from multiple widgets without the need to open them in full screen mode.

===User interaction===

===User interaction===

−

Current home screen widgets do not allow direct user interaction, as explained in [http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-4F4EE10B-BC2C-4046-ADDB-AD4B67DB2A11.html this Forum Nokia Library page]. When '''the user clicks''' on a home screen widget, the '''full screen version of the widget is opened'''.

+

Current home screen widgets do not allow direct user interaction, as explained in [http://library.developer.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-4F4EE10B-BC2C-4046-ADDB-AD4B67DB2A11.html this Nokia Developer Library page]. When the user clicks on a home screen widget, the full screen version of the widget is opened.

===Sensor based interaction===

===Sensor based interaction===

−

This sections shows '''two possible way of interactions''' with home screen widgets, that use the '''inbuilt device's accelerometer''' and the [http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-B77C2006-879F-4AC6-B7BF-04B25B563A29.html JavaScript Sensor Service API], available starting from WRT 1.1.

+

This sections shows two possible way of interactions with home screen widgets, that use the inbuilt device's accelerometer and the [http://library.developer.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-B77C2006-879F-4AC6-B7BF-04B25B563A29.html JavaScript Sensor Service API], available starting from WRT 1.1.

==Sensor based interaction patterns==

==Sensor based interaction patterns==

This sections discusses some possible patterns of interaction that can be used to let users interact with home screen widgets, without the need of touch-based interactions. In order to implement the following patterns, the JavaScript Sensor Service API must be used.

This sections discusses some possible patterns of interaction that can be used to let users interact with home screen widgets, without the need of touch-based interactions. In order to implement the following patterns, the JavaScript Sensor Service API must be used.

−

'''Complete code examples''' on how to use Sensors in WRT widgets can be found on the following pages:

+

Complete code examples on how to use Sensors in WRT widgets can be found on the following pages:

Inbuilt accelerometers allow to '''detect device's motions''', by measuring the device acceleration in the three spatial directions. By using this data, '''it is possible to identify when the device is shaken''', by checking for fast and repetitive motions.

+

Inbuilt accelerometers allow to detect device's motions, by measuring the device acceleration in the three spatial directions. By using this data, it is possible to identify when the device is shaken, by checking for fast and repetitive motions.

−

The '''sensor channel''' used to retrieve the acceleration values is the '''AccelerometerAxis''' (more information here: [http://library.forum.nokia.com/topic/Web_Developers_Library/GUID-A4538B4D-0D90-43F8-B1FA-72F616937760.html http://library.forum.nokia.com/topic/Web_Developers_Library/GUID-A4538B4D-0D90-43F8-B1FA-72F616937760.html])

+

The sensor channel used to retrieve the acceleration values is the AccelerometerAxis (more information here: [http://www.developer.nokia.com/Resources/Library/Web/ http://www.developer.nokia.com/Resources/Library/Web/])

[[Image:Wrt_shakepattern.png]]

[[Image:Wrt_shakepattern.png]]

The shake pattern could be used for several purposes, depending on the specific home screen widget:

The shake pattern could be used for several purposes, depending on the specific home screen widget:

−

* if a widget '''shows data retrieved from a remote host''', the shake actions could be used to '''force a refresh of the data presented to the user'''. This could allow to '''avoid automatic and unnecessary refreshes''', so minimizing network traffic.

+

* if a widget shows data retrieved from a remote host, the shake actions could be used to force a refresh of the data presented to the user. This could allow to avoid automatic and unnecessary refreshes, so minimizing network traffic.

−

* if a widget '''shows multiple items''' (e.g.: photos, news), the shake movements can be used to view the next available items.

+

* if a widget shows multiple items (e.g.: photos, news), the shake movements can be used to view the next available items.

===Flip pattern===

===Flip pattern===

−

Sensors can be used to '''detect the current orientation of the phone''', by using the '''Orientation''' sensors' channel.

+

Sensors can be used to detect the current orientation of the phone, by using the Orientation sensors' channel.

Depending on the device orientation, it is so possible to let WRT widgets behave differently.

Depending on the device orientation, it is so possible to let WRT widgets behave differently.

[[Image:Wrt_flippattern.png]]

[[Image:Wrt_flippattern.png]]

−

A possible '''use-case''' for this scenario is a widget that '''periodically retrieves data from a network host''', so actually doing network traffic. In this situation, it could be useful to '''stop the automatic data refresh''' just '''flipping the device display downwards'''.

+

A possible use-case for this scenario is a widget that periodically retrieves data from a network host, so actually doing network traffic. In this situation, it could be useful to stop the automatic data refresh just flipping the device display downwards.

−

More generally, this pattern could be useful in all these situations where the user could be '''allowed to "stop" the widget's actions''' by simply down-flipping the mobile device (e.g.: during night).

+

More generally, this pattern could be useful in all these situations where the user could be allowed to "stop" the widget's actions by simply down-flipping the mobile device (e.g.: during night).

==Considerations==

==Considerations==

−

'''Constraints to be considered''' when implementing sensor-based interaction patterns:

+

Constraints to be considered when implementing sensor-based interaction patterns:

−

* '''battery consumption''': continuously monitoring accelerometer sensors impacts on battery life. Careful testing and tuning should so be performed in order to optimize the sensors' monitoring, without causing too much battery consumption.

+

* battery consumption: continuously monitoring accelerometer sensors impacts on battery life. Careful testing and tuning should so be performed in order to optimize the sensors' monitoring, without causing too much battery consumption.

−

* '''unintentional device motions''': home screen widgets are designed to be always active. For this reason, the sensors' monitoring should be designed in order to detect unintentional motions, in order to avoid unwanted widget's responses.

+

* unintentional device motions: home screen widgets are designed to be always active. For this reason, the sensors' monitoring should be designed in order to detect unintentional motions, in order to avoid unwanted widget's responses.

−

* '''multiple home screen widgets''': since home screen allows to use multiple widgets at the same time, users could want to disable sensor-based interaction for some of them, and so to choose to interact only with some widgets. So, an option to enable/disable sensor-based interaction should be given to the user.

+

* multiple home screen widgets: since home screen allows to use multiple widgets at the same time, users could want to disable sensor-based interaction for some of them, and so to choose to interact only with some widgets. So, an option to enable/disable sensor-based interaction should be given to the user.

Latest revision as of 05:36, 10 October 2012

This article proposes some sensor-based interaction patterns to be used with home screen Symbian Web Runtime widgets.

Article Metadata

Article

Created: jappit
(25 Jun 2009)

Last edited: hamishwillee
(10 Oct 2012)

Contents

Starting with Nokia N97, Web Runtime offer the possibility to add widgets to the device home screen. Home screen widgets allow users to view data from multiple widgets without the need to open them in full screen mode.

Current home screen widgets do not allow direct user interaction, as explained in this Nokia Developer Library page. When the user clicks on a home screen widget, the full screen version of the widget is opened.

This sections discusses some possible patterns of interaction that can be used to let users interact with home screen widgets, without the need of touch-based interactions. In order to implement the following patterns, the JavaScript Sensor Service API must be used.
Complete code examples on how to use Sensors in WRT widgets can be found on the following pages:

Inbuilt accelerometers allow to detect device's motions, by measuring the device acceleration in the three spatial directions. By using this data, it is possible to identify when the device is shaken, by checking for fast and repetitive motions.
The sensor channel used to retrieve the acceleration values is the AccelerometerAxis (more information here: http://www.developer.nokia.com/Resources/Library/Web/)

The shake pattern could be used for several purposes, depending on the specific home screen widget:

if a widget shows data retrieved from a remote host, the shake actions could be used to force a refresh of the data presented to the user. This could allow to avoid automatic and unnecessary refreshes, so minimizing network traffic.

if a widget shows multiple items (e.g.: photos, news), the shake movements can be used to view the next available items.

Sensors can be used to detect the current orientation of the phone, by using the Orientation sensors' channel.
Depending on the device orientation, it is so possible to let WRT widgets behave differently.

A possible use-case for this scenario is a widget that periodically retrieves data from a network host, so actually doing network traffic. In this situation, it could be useful to stop the automatic data refresh just flipping the device display downwards.

More generally, this pattern could be useful in all these situations where the user could be allowed to "stop" the widget's actions by simply down-flipping the mobile device (e.g.: during night).

Constraints to be considered when implementing sensor-based interaction patterns:

battery consumption: continuously monitoring accelerometer sensors impacts on battery life. Careful testing and tuning should so be performed in order to optimize the sensors' monitoring, without causing too much battery consumption.

unintentional device motions: home screen widgets are designed to be always active. For this reason, the sensors' monitoring should be designed in order to detect unintentional motions, in order to avoid unwanted widget's responses.

multiple home screen widgets: since home screen allows to use multiple widgets at the same time, users could want to disable sensor-based interaction for some of them, and so to choose to interact only with some widgets. So, an option to enable/disable sensor-based interaction should be given to the user.