• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
http://cmer.cis.uoguelph.ca
 

http://cmer.cis.uoguelph.ca

on

  • 1,350 views

 

Statistics

Views

Total Views
1,350
Views on SlideShare
1,350
Embed Views
0

Actions

Likes
0
Downloads
10
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    http://cmer.cis.uoguelph.ca http://cmer.cis.uoguelph.ca Presentation Transcript

    • BlackBerry Widgets Getting Started
    • What is a Widget?
      • Widgets are local web applications written in HTML/CSS/JavaScript
      • Widgets can help deal with device heterogeneity as they are written in open web technologies
      • Widgets also store information on the device as opposed to traditional web application which need to download the information each time
    • Blackberry Widgets
      • Blackberry Widgets are standalone Blackberry device applications
      • Composed of standard web components such as HTML, XHTML, style sheets, Javascript, SVG, and image files
      • Follow same rules regarding security, configuration, and deployment as any other Blackberry application
    • Widget SDK
      • Blackberry Widget SDK can be used to create Blackberry Widget applications
      • Includes Blackberry Widget Packager, code samples, smartphone simulator, MDS Connection simulator, and documentation
      • Widget development is tool independent
      • Any tool can be used to create Blackberry Widgets and the Packager is used to compile the widgets
    • Widget Packager
      • Command line tool that compiles web code to create Blackberry Widgets
      • Creates executable application file (.cod) and installation file (.alx)
    • Widget Communication
      • Widgets support push and pull communication
      • Pull communication can be accomplished using XMLHttpRequest
      • Pull communication can be synchronous or asynchronous
      • Requests to external domains from your widget must match URLs that you provide using widget permissions
    • Widget Communication
      • Push communication is accomplished through a backend server
      • blackberry.push and blackberry.push.Data enable the device to use push technology
      • Widgets can operate in the background freeing the user to do other work
    • Widget Configuration Document
      • XML file that contains the elements to define the namespace, name of widget, widget permissions, elements to set the start page, icons to use, author, email address, and license information
      • Contains widget element at its root
      • Configuration document must be in root directory of Blackberry Widget archive
    • Widget Configuration Document Example
      • A valid configuration document is named config.xml and is case sensitive and must be in root folder of widget archive
      • Below is sample code for a configuration document:
        • <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?>
        • <widget xmlns=&quot; http://www.w3.org/ns/widgets&quot; xmlns:rim=&quot;http://www.blackberry.com/ns/widgets&quot; version=&quot;2.0&quot; rim:header=&quot;RIM-Widget: rim/widget&quot;>
        • <name> The example widget</name>
        • <description> A sample widget to demonstrate some of the possibilities. </description>
        • <icon src=&quot;icons/example.png&quot;/>
    • Widget Configuration Document Example
        • <icon src=&quot;icons/boo.png&quot; rim:hover=&quot;true&quot;/>
        • <content src=&quot;index.jsp&quot;/>
        • <feature id=&quot;blackberry.ui.dialog&quot; required=&quot;true&quot; version=&quot;1.0.0&quot;/>
        • <access uri=&quot;http://www.somedomain.com&quot; subdomains=&quot;true&quot;>
        • <feature id=&quot;blackberry.pim.memo&quot; required = &quot;true&quot; version=&quot;1.0.0&quot;/>
        • <feature id=&quot;blackberry.invoke.MemoArguments&quot; required = &quot;true&quot; version=&quot;1.0.0&quot;/>
        • </access>
        • <rim:connection timeout=&quot;25&quot;>
        • <id>TCP_WIFI</id>
        • <id>MDS</id>
        • <id>BIS-B</id>
        • <id>TCP_CELLULAR</id>
        • <id>WAP2</id>
        • <id>WAP</id>
        • </rim:connection>
    • Widget Configuration Document Example
        • <license>
        • Example license
        • Copyright (c) 2008 The Acme Corp.
        • THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, INSULT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        • </license>
        • </widget>
    • Configuration Elements - Namespace
      • The following are the elements and their attributes that are found in the Widget Configuration document
      • Widget namespace
        • Widget namespaces must be assigned to widget elements otherwise the archive is invalid
        • The widget namespace is http://www.w3.org/ns/widgets
        • The namespace for BlackBerry-specific widget extensions is xmlns:rim http:// www.blackberry.com /ns/widgets
    • Configuration Elements - Widget
      • Widget element
        • Root element
        • Inside the Widget element the following rules apply for all other elements
          • one name element
          • zero or one description elements
          • zero or more icon elements
          • zero or more access elements
          • zero or one content elements
          • zero or more feature elements
          • zero or one rim:loadingScreen elements
          • zero or one rim:connection elements
    • Configuration Elements - Widget
        • version
          • Required
          • Specifies valid version for Widget in following format
            • a.b
            • a.b.c
            • a.b.c.d
          • Widget archive invalid if invalid version number is used
        • rim:header
          • Optional
          • Precedes every request for data allowing you to differentiate from browser requests
    • Configuration Elements - Widget
        • id
          • Optional
          • Unique Widget identifier
        • xml:lang
          • Optional
          • Language used in element, en for English
    • Configuration Elements - Name
      • Name element
        • Specifies a human-readable name for a Widget
        • Missing name element makes the Widget invalid
        • blackberry.app.name in the Widget API can also be used to provide a name
        • xml:lang
          • Optional
          • Defines language used in element
        • its:dir
          • Specifies direction of language such as right to left, its:dir=&quot;rtl&quot;
          • Used for localization
    • Configuration Elements – Description
      • Description element
        • Description for Widget
        • blackberry.app in the Widget API may be used
        • xml:lang and its:dir also in this element
    • Configuration Elements - Icon
      • Icon element
        • Optional
        • First icon element without rim:hover set to True is main icon for Widget
        • blackberry.app.setHomeScreenIcon(src, rim:hover) in Widget API may also be used
        • src
          • Required
          • Specifies path for icon
        • rim:hover
          • Optional, default value is false
          • Specifies icon to use as hover icon
    • Configuration Elements - Access
      • Access element
        • Allows permission to access external network resources
        • By default Widget has access to all local resources
        • URI
          • Required
          • Defines address for access request
        • Subdomains
          • Optional
          • Boolean value that allows for subdomains of URI to have access requests
    • Configuration Elements - Feature
      • Feature element
        • Specifies API that Widget can use
        • Can be used within access element to access feature in external domain
        • Can be used in root of configuration document before any access elements to access the local page
        • If no API is specified the feature cannot be used by the Widget
    • Configuration Elements - Feature
      • Feature element
        • id
          • Required
          • Identifies API to be used, name must match API but is not case sensitive, (*) may be used for multiple namespaces
        • required
          • Optional
          • Provided for conformance to W3C specifications
        • version
          • Optional
          • Specifies library version of APIs
    • Configuration Element - Content
      • Content element
        • Identifies start file to use when Widget starts
        • If none present default file from archive is used
        • src
          • Required
          • Source HTML file within Widget archive
        • type
          • Optional
          • MIME type of file in src
        • charset
          • Optional
          • Identifies character set that is used in src
    • Configuration Element – RIM loadingScreen
      • RIM loadingScreen element
        • Identifies properties of loading screen that appears when Widget starts
        • backgroundColor
          • Optional
          • Identifies HEX colour value to display before start page appears
    • Configuration Element – RIM connection
      • RIM connection element
        • Specifies connection preference for device
        • timeout
          • Optional
          • Default timeout is 30000 ms
          • Time must be in ms and valid numerical value otherwise ignored
          • Overrides default timeout when device attempts to connect to a particular transport
    • Configuration Element – RIM connection
      • ID element
        • Optional
        • Identifies type and order of communication transports that will be used for Widget
        • Default order is following:
          • MDS: BlackBerry® Enterprise Server
          • BIS-B: BlackBerry® Internet Service
          • TCP_WIFI: Wi-Fi® network
          • TCP_CELLULAR: Direct TCP stack
          • WAP2: Service provider WAP 2.0 gateway
          • WAP: Service provider WAP 1.0 gateway
    • Widget Archive
      • A .zip file that is compiled by Widget Packager to create a Blackberry Widget
      • Widget archive contains:
        • Configuration document
        • Start page
        • Application icons
        • Other resources and objects referenced in your web pages
      • Widgets should be stored outside Widget Packager installation directory
    • Widget Archive – Start Page
      • Start page is the page that is displayed to the user upon starting the Widget
      • If a start page is not defined in configuration document or error occurs a default start file is used
      • The default name in search order is index.htm or Index.jsp
      • Default MIME is text/html and the default search is case insensitive
      • External start pages may also be used
    • Widget Archive – Application Icons
      • Custom icons may be used to show your Widget
      • The application icon is the icon when the Widget has not been highlighted
      • Default name is icon.gif or .png and must exist in root directory of Widget archive
      • The config document may also be used to set the icon
        • <icon src=&quot;icons/appicon.gif&quot;/>
    • Widget Archive – Hover Icons
      • The hover icon is the icon that is displayed when the user is on the Widget
      • The icon can be set in the configuration document
        • <icon src=&quot;icons/appfocus.gif&quot; rim:hover=&quot;true&quot;/>
      • If no hover icon is set the default application icon is used
    • Reserved Names
      • config.xml
        • Widget Configuration Document
      • signature[0..9].xml
        • Blackberry Signature Tool Configuration
      • icon.gif or icon.png
        • Default icon
      • Thumbnail.gif or Thumbnail.png
        • Thumbnail graphics
      • index.htm or index.jsp
        • Default start page
    • Gears
      • Set of Javascript extensions that is exposed through Blackberry Widget APIs
      • Used to create applications that extend beyond browser platform
      • Key features:
        • Persistent client-side data storage
        • Ability to run multiple Javascripts in parallel
    • Blackberry Widgets Related Work
    • PhoneGap
      • Open source development tool for building mobile apps with HTML/CSS/Javascript
      • Compatible with Android, iPhone, and Blackberry
      • Attempt to cover many different devices from different manufacturers in one development tool
    • Rhomobile
      • Cross-platform development tool which is based on MVC framework
      • Views are written in HTML and the application is compiled in the device’s native language
      • Some advanced functionality recommends additional Rhomobile products such as a sync server
      • Applications may not have exact look and feel of native applications on devices
    • Blackberry Widgets Design Principles
    • Design Considerations
      • Mobile devices
        • Smaller screen size
        • Slower processor
        • Wireless networks have longer latency
        • Less available memory
        • Shorter battery life
        • One screen display
    • Design Considerations
      • When designing a Blackberry Widget consider:
        • Using or extending existing UI components so application can inherit default behaviour of component
        • Modifying standard navigation model
        • Making all actions that are relevant to user’s context available in menu
        • Simplifying data selection and presentation to information only user needs at given moment
    • Design Considerations for Device
      • Unless designed for one device in mind, application should be usable on as many devices as possible
      • Widgets do not support zooming or column views like Blackberry browsers do
    • Design Considerations for Device
      • Use Cascading Style Sheets to control presentation when possible
        • Create a single HTML file with multiple CSS files rather than multiple HTML files with different formatting
      • Create pages that are viewable on wide and narrow screens
        • Can be done through multiple CSS files or by percentage of screen size
    • Design Considerations for Device
      • Pages should resize properly on devices that have a touchscreen
      • The following code shows how to use Javascript to identify orientation of screen
        • function resetHeight() { document.getElementById(&quot;mainBody&quot;).style.height = screen.height+&quot;px&quot;; }
        • <body id=&quot;mainBody“ onload=&quot;javascript:resetHeight();&quot; >
    • Design Considerations for Device
      • The below code shows how to reset the page height when the orientation changes
        • window.onorientationchange = function() { document.getElementById(&quot;mainBody&quot;).style.height = screen.height+&quot;px&quot;; }
    • Design Considerations for Device
      • Content should be designed with so as not being dependent on a single input method
        • Testing should be done to see how trackball events, touch screen events and keyboard inputs are treated on different devices
    • Design Considerations for Device
      • Widgets make HTTP requests which contain a Profile header
      • This header provides information about the device such as model number and software version in <BlackBerry-model> and <software-version>
      • Profile Header
        • http://www.blackberry.net/go/mobile/profiles/uaprof/ <BlackBerry-model> / <software-version> .rdf
    • Design Considerations for Users
      • Focus on the user experience
        • Know who will use your Widget, what their needs and expectations are, and how your Widget will meet them
      • Balance need of feature rich content on Widgets with fast loading times
        • Understanding users will allow you to make better informed decisions on the content they require
    • Design Considerations for Users
      • Avoid designs where content is distant from your users
        • Keep the number of clicks users have to make to reach content to a minimal
      • Widgets should be easy to view on device
        • Content should be visible without using zoom and column view
        • Use <meta> tags to control the initial scale of content
        • Avoid absolute positioning on a screen that requires vertical scrolling, this causes stuttering
    • Design Considerations for Wireless Networks
      • Send only the information necessary and send it as efficiently as possible
      • Content to be delivered over the wireless network must:
        • Avoid costing the user an increasing amount of money as some may pay per the data transferred
        • Conscious of network bandwidth, wireless networks are usually slower than wired networks so content must be designed with that in mind
    • Design Considerations for Wireless Networks
      • Apply some concepts for efficient web content design to your widgets
        • Structural HTML to create logical HTML blocks in code using <div> for content blocks and <h1,h2,..> for hierarchies
        • CSS to control layout and presentation
        • Separate files for content, presentation, and interaction. External CSS and scripts files can be reused when visiting your page.
      • Inline and internal styles and scripts are less efficient and over time require more transfers
    • Design Considerations for Wireless Networks
      • One can also minimize impact of slower wireless networks by:
      • Users need to make fewer requests to reach content
        • Less requests means less transfers of data in a slow network. Efficient Widgets should have clear navigation, clear labels, and well-designed pages
    • Design Considerations for Wireless Networks
      • Scripting techniques to progressively render pages
        • Consider loading portions of the content in phases. Load an initial portion then use XMLHttpRequest to load the remaining content so that the user is not blocked from doing work while the content loads.
        • You may also use HttpRequest from Gears which can work in a WorkerPool making it even more efficient
    • Design Considerations for Wireless Networks
      • Widgets should push content proactively
        • You can use the Blackberry technology to send content before the user requests it, that way once I user needs that content it is ready for them to use and they do not need to wait for it to be downloaded by the Widget
    • Supported Standards and Content Types
      • Know the standards and content types supported by the Blackberry Widget
      • Web standard supports can be found here:
        • Supported Web Standards
        • Supported Gears APIs
    • Blackberry Widgets Blackberry Integration
    • Integrating Blackberry Device Features
      • Integrating device features provides a better experience for users of your Widget
      • Create links that will automatically dial phone numbers when clicked
      • Widgets support the following types:
      • WTAI Make Call links (URI form)
        • <a href=&quot;wtai://wp/mc;14165551212&quot;>Call office</a>
    • Integrating Blackberry Device Features
      • I-mode format
        • <a href=&quot;tel:14165551212&quot;>Call office</a>
      • Direct Connect links on iDen networks
        • <a href=&quot;dc:234*234*234&quot;>Call office</a>
      • CTI
        • <a href=&quot;cti:333333&quot;>Call office</a>
      • blackberry.identity.phone can be used to access information about the device’s phone lines
    • Integrating Blackberry Device Features
      • GPS can be used to provide unique location based services on devices that have the feature available
      • Two methods to access GPS information
        • BlackberryLocation object in Javascript
        • Gears GeoLocation API
      • GeoLocation API provides more detail than BlackberryLocation but at a higher resource cost
    • Integrating Blackberry Device Features
      • Media can be used to augment your content. Blackberry Browser supports a variety of codecs
      • Always be aware of the size of media you are transferring to the user and the potential costs in both time and money for the user
    • Integrating Blackberry Device Applications
      • Consider also integrating your Widget with existing Blackberry applications to provide a more complete experience
      • For example you may invoke:
        • Calendar to display appointments
        • Address book to display content
        • Browser to open website
        • Phone to dial number
    • Accessing Email and Organizer Data
      • The blackberry.pim object can be used to access PIM information from:
        • Email messages
        • Contacts
        • Calendar entries
        • Tasks
        • Call logs
      • Widgets can read, write, and modify entries as long as resources are defined in configuration document
    • Custom Menus
      • Blackberry.menu.ui object in Blackberry Widget API can be used to add custom menu items
      • Custom menus can provide users additional functionality such as showing the location of the email sender
      • As a user clicks on a sender’s email address they Widget can reference the contact list and use the Gears Geolocation API to show a map with the sender’s location
    • Blackberry Widgets Security Considerations
    • External Resource and API Access
      • Widgets cannot access external resources by default
      • To access external resources and APIs they must be defined in the Widget configuration document
      • Define a list of domains and the Widget APIs that can be accessed by them
      • List can be defined using Widget permissions or a white list
    • External Resource and API Access
      • To make the widget as secure as possible when accessing external content consider:
        • Javascript access to sensitive APIs only to trusted and secure web sites
        • Use HTTPS when exposing sensitive APIs for communication
        • Use precautions that protect against cross-site scripting attacks
    • External Resource and API Access
      • To allow your Widget to access data from changing domains or unknown domains use the wildcard character
      • Web pages cannot use any of the Blackberry Widget APIs when the widget accesses them from an external source using the wildcard character
        • <access uri =&quot;*&quot;/>
    • External Resource and API Access
      • To access functionality in a domain your Widget must use the access and feature elements
      • In the below example features of the mydomain you specify are accessable
        • <access uri =&quot;mydomain&quot; subdomains=&quot;true&quot;>
        • <feature id=&quot; . . . />
        • <feature id=&quot; . . . />
        • </access>
    • Signing your Blackberry Widget
      • Blackberry Widget Packager includes Blackberry Signature Tool
      • Applications that use controlled APIs need signatures from the Blackberry Signing Authority Tool
    • Authentication
      • Device users can set passwords on the devices that limit access to applications such as Widgets on their device
      • IT Administrators can set special IT policies to through the Blackberry Enterprise Server to ensure devices in a company are password protected
    • Authentication
      • If additional security is required for sensitive Widgets you may consider adding a login screen at the start of the application
      • Blackberry allows for input fields that hide the characters entered for items such as passwords
    • Authentication
      • An additional method of authentication may be added if the Widget accesses an application on a server
      • You may require the Widget provide a username and password which can be accomplished through simple HTTP authentication, adding the information in the HTTP header
      • Certificates may also be used for authentication
    • Application Control
      • IT Administrators can control the applications that are allowed on a Blackberry device through the application control policy
      • In order for this to be accomplished the Blackberry must be associated with a Blackberry Enterprise Server
    • File Encryption
      • Files that are accessed by the Widget are decrypted and moved from the microSD card to the Blackberry device
      • Files with a .rem extension can only be decrypted on a Blackberry
      • A master key stored on the microSD media card is used to encrypt and decrypt BlackBerry device media files
    • Memory Access
      • Widgets may only write to memory the Java Virtual Machine uses
      • Widgets cannot access memory or persistent storage of other applications unless granted
      • Access to persistent storage, data, or communication to applications is limited to specific Blackberry Widget APIs
    • Memory Access
      • Gears applications can only access resources with the same scheme, domain, and port number, as the application
      • Widgets create a database in a domain-specific subfolder inside a Gears specific subfolder
      • A Gears application located at www.mycompany.com/gearsapp translates to /BlackBerry/system/appdata/rim/gears/mycompany/com
    • Memory Access
      • An application can access a database only by using path names that are relative to the origin domain
      • Applications cannot access databases using absolute path names
      • As in the Gears specification, Widgets do not allow access to SQLite commands that can potentially compromise security, such as ATTACH DATABASE, DETACH DATABASE, and PRAGMA
    • Memory Access
      • User permission is required for scripts that access storage space or functionality outside the scope of the Widget
      • A dialog box is presented to the user for their permission
      • Permissions are stored in database on media card either internal or external or in temporary cache
      • Permissions remain until user changes settings or cache is cleared
    • Data Encryption
      • Data is encrypted when a Blackberry is connected through a Blackberry Enterprise Server
      • Encryption is done with AES or TripleDES between the device and Enterprise Server, encryption outside the Server can be done through HTTPS or STL/TLS encryption
      • Data is not encrypted when using the Blackberry Internet Service
    • Blackberry Widgets Compilation
    • Widget Compilation Process
      • When a Widget is compiled the Widget Packager takes the following steps:
        • Contents of Widget archive are validated
        • Output file folder is created
        • Creates source target folder if needed
        • Creates .cod, .alx, .jad, .cso, and .csl files for various distribution methods and signing
        • Signed Widgets need updated .cod file
    • Install the new registry key with the BlackBerry Signature Tool
      • In the BlackBerry Developer Zone at https:// www.blackberry.com/SignedKeys , complete the registration form. After you complete the form, RIM will send an email message containing a .csi file. The .csi file contains a list of signatures, along with your registration information
      • At the command prompt, navigate to the bin folder within the BlackBerry Widget Packager installation directory
      • Type the following command, including the full path of the .csi file: java -jar SignatureTool.jar <.csi file path>
      • If a dialog that a private key cannot be found appears, perform the following actions:
        • Click Yes.
        • Type a password for the private key.
        • Type the password to confirm it.
        • Click OK.
        • Move the mouse to generate data for the new private key.
      • In the Registration PIN field, type the PIN that RIM provided
      • In the Private Key Password field, type a password of at least eight characters. This is the private key password
      • Click Register
      • Click Exit
    • Widget Compilation Process
      • To compile a widget:
        • Run the Widget Packager from the installation folder in the command prompt
        • Compile by using the following command:
        • bbwp “[drive:] [path] archive” [/s [dir]] [/[-]g [password]] [/o dir]
        • Ensure the path is correct and a bbwp.properties file exists
    • Widget Compilation Process Parameters
      • archive
        • Identifies .zip Widget archive to compile
      • /g
        • Signs a .cod file with given password, default is /-g for unsigned Widget
      • /o
        • Saves output files to given folder, if not specified same path as Widget archive is used
      • /s
        • Saves source files to specified folder, if none specified same path as Widget archive is used
    • Widget Compilation Process Best Practices
      • Resource names should be consistent and correct
        • You should only use alphanumeric names and file names and references are case sensitive
      • All required elements should be in configuration document
        • At minimum namespace, Widget, version, and name elements are defined
      • Ensure required elements of your Widget are defined in configuration document
    • Blackberry Widgets Testing and Distribution
    • Testing
      • You may use the Smartphone simulator to test your Blackberry Widgets
        • On the Start menu, select Programs > Research In Motion > BlackBerry Widget Packager > BlackBerry Smartphone Simulator
        • After the Smartphone Simulator starts and you can see the Home screen, on the File menu, select Load Java Program
        • Navigate to the output folder for your BlackBerry Widget and select the widget .cod file you want to run
        • Click Open
        • On the Applications screen, open the Downloads folder
        • In the Downloads folder, click the BlackBerry Widget you created
    • Testing
      • You may test your Widget on a physical device
      • Using the javaloader you can upload your application
      • You may use the following command in the command prompt:
        • JavaLoader [-usb] [-pport] [-bbps] [-wpassword] load file
    • Testing
      • Port
        • The serial port to which the device connects (default is COM1), or a device PIN if the device connects to a USB port, which the –usb option must be specified
      • Bps
        • The bit rate speed to the serial port (default is 115200)
    • Testing
      • Password
        • Password for Blackberry device if set
      • File
        • .cod files that will be loaded on the device
        • If .cod file is not in same folder full path must be specified
    • Distribution
      • Blackberry Widgets can be distributed to users through:
        • Blackberry App World
        • Wireless Network through Blackberry Browser
        • Blackberry Desktop Manager
        • Blackberry Application Web Loader
        • Wireless Push from the Blackberry Enterprise Server
    • Blackberry Widgets Sample Applications
      • HTML Code
      • <html>
      • <head>
      • <title>Hello World Example</title>
      • <script src=&quot;Scripts/action.js&quot; type=&quot;text/javascript&quot;></script>
      • <link href=&quot;Styles/simple.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; />
      • <style type=&quot;text/css&quot;>
      • #txtCount
      • {
      • width: 128px;
      • }
      • </style>
      • </head>
      • <body>
      • <p>
      • Hello, welcome to a very simple example of how to use a BlackBerry Widget. This sample will just increment the counter below as you hit the button.
      • </p>
      • <input type=&quot;text&quot; id=&quot;txtCount&quot; value=&quot;Clicked 0 times&quot; />
      • <br />
      • <button id=&quot;btnAppend&quot; onclick=&quot;append();&quot;>Increment Counter</button>
      • </body>
      • </html>
      • Execution
      HelloWorld App
    • Upcoming Appointments Script Code
      • function LoadAppts() {
      • var date = new Date();
      • //use the blackberry API's to create your filter object
      • var filter = new blackberry.find.FilterExpression(&quot;start&quot;, &quot;>=&quot;, date);
      • //use the blackberry API's to retrieve all of the appointments on the device that pass the filter
      • var appts = blackberry.pim.Appointment.find(filter);
      • //modify your html to display a list of the appointments that passed the filter. This will add them
      • //to a table for upto the next 10 appointments.
      • var table = document.getElementById(&quot;appts&quot;);
      • for (i = 0; i < appts.length || i == 10; i++) {
      • var start = appts[i].start;
      • var summary = appts[i].summary;
      • var row = document.createElement(&quot;TR&quot;);
      • var startCell = document.createElement(&quot;TD&quot;);
      • var summaryCell = document.createElement(&quot;TD&quot;);
    • Upcoming Appointments Script Code
      • startCell.setAttribute('class', 'appListItem');
      • summaryCell.setAttribute('class', 'appListItem');
      • var startFormatted = start.toLocaleDateString() + &quot;-&quot; + start.toLocaleTimeString();
      • var startText = document.createTextNode(startFormatted);
      • var summaryText = document.createTextNode(summary);
      • startCell.appendChild(startText);
      • summaryCell.appendChild(summaryText);
      • row.appendChild(startCell);
      • row.appendChild(summaryCell);
      • table.appendChild(row);
      • }
      • }
    • Upcoming Appointments
      • FileIO
      • Gears Shopping List
      Additional Examples
    • Tools
      • BlackBerry Java Application Development v5.0 Beta 5 - http://na.blackberry.com/eng/developers/devbetasoftware/javasdk5.jsp
      • BlackBerry Widget Sample -http://docs.blackberry.com/en/developers/subcategories/?userType=21&category=BlackBerry+Widgets&subCategory=BlackBerry+Widget+Sample+Applications
      • Blackberry Widget SDK - http://na.blackberry.com/eng/developers/devbetasoftware/widgetsdk.jsp
      • BlackBerry Web Plug-in - http://na.blackberry.com/eng/developers/devbetasoftware/eclipseplugin.jsp
    • References
      • &quot;BlackBerry Widgets - Manuals and Guides.&quot; BlackBerry - Manuals and Guides . Web. 18 Dec. 2009. http:// docs.blackberry.com/en/developers/categories/?userType =21&category= BlackBerry+Widgets
      • Koch, Peter-Paul. &quot;QuirksBlog: Introduction to W3C Widgets.&quot; QuirksMode - for all your browser quirks . Web. 16 Dec. 2009. http://www.quirksmode.org/blog/archives/2009/04/introduction_to.html
      • PhoneGap | Cross platform mobile framework . Web. 18 Dec. 2009. http:// phonegap.com /
      • Rhomobile - the open mobile framework . Web. 18 Dec. 2009. http:// rhomobile.com /
      • &quot;Widget Packaging and Configuration.&quot; World Wide Web Consortium (W3C) . Web. 18 Dec. 2009. http://www.w3.org/TR/2009/CR-widgets-20091201/