Skip to main content
Samsung Developer Program

Controlling Text and Graphic Content

Your Android™ app can specify and format text for primary and secondary sections: titles, sub-headers, bodies, and icon lines.

Both primary and secondary sections support the following tags to format text:

Bold

<b></b>

Italics

<i></i>

Color

 

<font color=”#RRGGBBAA”></font>

<font color=”#RRGGBB”></font>

<font color=”#RGBA”></font>

<font color=”#RGB”></font>

 

#[Red-Green-Blue-(Alpha) code]

Hexadecimal color specified with an RGB value and an optional alpha channel

[templateName].[textParameter]("[Text Content]");
[templateName].[textParameter]("<b>[Text]</b> <i>[Content]</i>");

To specify the body text in a secondary section:

mySecondarySection.setBody("<font color=\”#00F\”><i>The <b>big</b> question</i> 
                                          surrounding the next album</font> is <b>whether ...</b>");

The big question surrounding the next album is whether ...

Controlling Graphic Content

Rich Notification supports using JPG and PNG image files for backgrounds and icons. Image bitmaps must be declared via the Android API before image assets are declared. Image assets must be declared, via the Rich Notification API, before being specified for use in a rich notification.

SrnImageAsset

SrnImageAsset

Creates an image asset of the specified application context, image asset name, and image bitmap name.

context

name

image

Context in which the image asset is to be created.

Declared name of the image asset.

Name of the image bitmap.