rim:background element

Supported platforms

  • yes BlackBerry OS: 5.0 - 7.0
  • no BlackBerry PlayBook OS: 2.0+
  • no BlackBerry 10 OS: Supported through the <param> element.

Syntax

<rim:background src="string" 
     runOnStartup=["true" | "false"]
     charset="string" />

Description

The <rim:background> element specifies a background start page for your BlackBerry WebWorks application. You cannot use this element without specifying a valid src attribute.

Parent elements

<content>

Child elements

None

Occurrences

Zero or one

Attributes

You can use the following attributes in this element:

Attribute Description
src

Specifies the source HTML file in the application archive.

This attribute is required.

runOnStartup

Specifies whether the background start page should appear when the BlackBerry device starts and when the application is installed.

By default, the background start page appears when the device starts.

This attribute is optional.

charset

Specifies the character set that is used by the file that is specified in the src attribute.

This attribute is optional.

Example: Specifying a foreground and background start page

You can start the application from an icon and also run the background start page when the device starts and when the application is installed.
<content src="index.html" >
   <rim:background src="listener.html" runOnStartup="true" />
</content>

Example: Specifying a background start page only

You can start the application when the device starts and when the application is installed.
<content>
   <rim:background src="listener.html" runOnStartup="true" />
</content>