getAllMessages( [messageFilter], [completeList] ) method

Gets received messages based on a filter and the existance of a default hybrid app.

Syntax

<static> getAllMessages( [messageFilter], [completeList] ) → {hwc.Message[]}

Parameters

Name Type Argument Description
messageFilter hwc.MessageFilter (optional) A filter that all returned messages will pass.If you do not want to filter based on a certain atribute, use null for that attribute when creating the filter. If you do not want to filter at all, pass in null for this parameter or do not pass in this parameter at all.
completeList boolean (optional) If this parameter is set to true, then all messages will be returned.If this parameter is set to false or if it is not set, then if there is a default hybrid app only the messages belonging to the default hybrid app will be returned (and if there is no default hybrid app all messages will be returned).

Returns

An array of hwc.Message objects - the received messages.

Type:

hwc.Message[]

Example

// get all messages that have the subject "a subject".
var filter = new hwc.MessageFilter( null, "a subject", null, null, null, null );
var messages = hwc.getAllMessages(filter);
// Get all messages without filtering, but if there is a default hybrid app only return its messages.
var messages = hwc.getAllMessages();
// Get all messages (without filtering) for all hybrid apps, even if there is a default hybrid app.
var messages = hwc.getAllMessages( null, true );

Source

hwc-api.js, line 2945.