getBuiltInIconUrl( iconIndex, processed ) method

Gets the icon URL for the built-in icon.

This function is used by hwc.getMsgIconUrl and hwc.getAppIconUrl. It is possible to call this function directly, but generally it is easier simply to call hwc.getAppIconUrl or hwc.getMsgIconUrl instead. Those functions handle both cases where there is and isn't a custom icon for the hybrid app or message.

Syntax

<static> getBuiltInIconUrl( iconIndex, processed ) → {string}

Parameters

Name Type Description
iconIndex number The index of the built-in icon.
processed boolean Whether or not to get the URL of the processed icon (true) or the unprocessed icon (false).

Returns

The URL to the icon.

[/reference/refbody/section/sectiondiv {""})

Type:

string

(sectiondiv]

Example

// Create the image element.
var builtInIcon = document.createElement( "img" );
// Set the source of the image to the icon URL.
builtInIcon.setAttribute( 'src', hwc.getBuiltInIconUrl(56, false) );
// Add the image element to the page.
document.body.appendChild( builtInIcon );

Source

hwc-api.js, line 2343.