rim:background 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 app. You cannot use this element without specifying a valid src attribute.

Compatibility note

If you port your app to BlackBerry 10, you will need to use the <param> element instead.

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 app archive.

This attribute is required.

runOnStartup

Specifies whether the background start page should appear when the BlackBerry device starts and when the app 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 app from an icon and also run the background start page when the device starts and when the app 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 app when the device starts and when the app is installed.
<content>
   <rim:background src="listener.html" runOnStartup="true" />
</content>

Last modified: 2013-10-02