Initialization
IWidgetsApi
The IWidgetsApi interface represents the entry point to the widget feature. It exposes the needed API to initiate the widget functionality. All clients should use the implementation of this interface for starting the widget feature.
1 2 3 4 5 6 7 8 9 10 |
|
The init method initializes the widget functionality and registers the broadcast receiver with the required actions.
The actions parameter represents the actions that are registered for extra communication with the client that integrates the widgets.
The context parameter represents the context used for registering the broadcast receiver.
The sdkOptions parameter represents the component used by the client to set the apiKey, apiSecret, endpoint, applicationID.
The Client app needs to include the telenav-sdk-base library and set the mandatory options in order to use the commerce widgets.
1 2 3 4 5 |
|
The clear method unregisters all receivers.
The context parameter represents the context used for unregistering all broadcast receivers.
1 |
|
Access the IWidgetsApi
In order to access the IWidgetsApi, use the following code.
1 |
|
Initialize the IWidgetsApi
In order to initialize the IWidgetsApi, use the following code.
1 2 3 4 5 6 |
|
SDKOptions
In order to build SDKOptions, use the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Info
All the widgets interaction is handled from inside.