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.

Bondi Widget porting example - devicestatus API

This article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.

Reasons:hamishwillee
(01 Jun 2011)The article is dependent on a wgt package from Bondi that is no longer available (Charge.wgt) because the site has merged with another. If anyone can find the linked package this header can be removed.

Contents

Preface

This is an example of porting a Bondi Widget to Nokia WRT using the guide found here. The example widget uses Bondi API specific device status functions. It gets charging status of battery, indicating whether the phone's battery is being charged or not.

1. Download the .wgt package

The Charge! widget package can be found by following this http://bondi.omtp.org/widget-gallery/Lists/Widgets/Attachments/29/Charge.wgt link. This porting example was written using the Charge! widget version 1.0. The link may require login credentials for the Bondi website.

2. Rename and unzip the Test widget archive

The archive needs to be unzipped to make modifications to its contents. First rename the file extension from *.wgt to *.zip. Then extract the zip archive.

3. Create info.plist manifest file

When installing a .wgz file the system looks for a manifest file called info.plist. The Bondi Widget equivalent is called config.xml.

Here's how to use the Bondi Widget config.xml data to create the WRT manifest file:

Download and unzip this info.plist template file and save it in the widget's root directory.

Open the widget's config.xml file and find the <name> element. Copy the text found within the element and paste it into the <string> element under <key>DisplayName</key> element of the info.plist file.

<key>DisplayName</key> <string>Charge!</string>

The identifier of a Bondi widget can be found in the id attribute of the <widget> element in config.xml. If the value is a URL, use the conventional WRT identifier form, which is the URL in reverse. Add the identifier to <string> element under <key>Identifier</key> element of the info.plist file.