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 Name | Parameters |
---|---|
startWidget | params_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 .
Name | Type | Description |
---|---|---|
activity | Activity | The main app activity |
config | HashMap<String, Object> | A collection of key-value pairs |
Return Type
View
Return Type per Platform
Platform | Return Type |
---|---|
iOS Swift | UIViewController |
Android | WebView |
Web Integration | N\A |
React | webview |
React Native | webview |
Angular | Webview |
Widget Activation Sequences
The bank initiates the widget sequence using the startWidget function as illustrated below.
Engage Widgets Activation Sequence**
- Begin with a startWidget call. The call always includes a ‘widgetType’ among it's parameters.
For example:startWidget ({“configurations”:{"widgetType":"hub"}…})
- 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:**
- Begin with a startWidget call, with the ‘widgetType’ defined as
manage-budgets
:
startWidget ({“configurations”:{"widgetType":"manage-budgets"}…})
- 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”: {…}})
- 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 ()
- Sent by the widget through the widget delegate function – following startWidget initialization
Updated 11 months ago