startWidget

Description

The startWidget function is used to render a Personetics widget within the bank page. The function may be accompanied by an additional payload.

startWidget Description

Function NameParameters
startWidgetparams_map

Note: Angular startWidget makes use of the web startWidget.

startWidgetWithView - Android

For Android, startWidget returns a native Android view that renders the required Personetics’ widget.
The bank can call this function to render the widgetType .

NameTypeDescription
activityActivityThe main app activity
configHashMap<String, Object>A collection of key-value pairs

Return Type
View

Return Type per Platform

PlatformReturn Type
iOS SwiftUIViewController
AndroidWebView
Web IntegrationN\A
Reactwebview
React Nativewebview
AngularWebview

Widget Activation Sequences

The bank initiates the widget sequence using the startWidget function as illustrated below.

Engage Widgets Activation Sequence**

  1. Begin with a startWidget call. The call always includes a ‘widgetType’ among it's parameters.
    For example: startWidget ({“configurations”:{"widgetType":"hub"}…})
  2. In some cases, the startWidget call may include additional payload parameters implemented using 'params', and more 'payload' parameters as relevant to the selected widgetType.
    startWidget ({“configurations”:{"{"widgetType":"hub", "params”: {…}})

Note: The payload structure differs per widget.

Budgets Widgets Activation Sequence:**

  1. Begin with a startWidget call, with the ‘widgetType’ defined as manage-budgets:
    startWidget ({“configurations”:{"widgetType":"manage-budgets"}…})
  2. In some cases, the startWidget call may include additional payload parameters implemented using 'params', and more 'payload' parameters as relevant to the manage-budgetswidgetType..
    startWidget ({“configurations”:{"{"widgetType":"manage-budgets", "params”: {…}})
  3. To display budgets data, the widget sends an API request getBudgetsCategories to the server. The API request should include language and protocol version, and sent using one of the following options, as determined by the bank:
    • Sent by the widget through the widget delegate function – following startWidget initialization
      Personetics Budgets Widget à Delegate:
      sendRequestToServer(getBudgetsCategories(), reqid)
    • Send by the bank application before startWidget, and provided as additional payload once startWidget is called
      Delegate à Server API: handlePserverRespnse ()