startClient( [onNotification] ) method

Start the client connection to the SUP server.

Companion function to hwc.shutdown. If a hybrid app is running in the context of the Hybrid Web Container then it will probably never have to call this function unless hwc.shutdown client was called first.

Syntax

<static> startClient( [onNotification] )

Parameters

Name Type Argument Description
onNotification anonymous.LogListener (optional) A log listener callback function.If you are interested in the connection state it is recommended that you call hwc.addConnectionListener before calling hwc.startClient.

Example

hwc.startClient();
// Add a log listener while calling hwc.startClient.
var logListener = function( time, event, message )
{
   alert(message);
}
hwc.startClient( logListener );

Source

hwc-api.js, line 531.