public interface FITAWebWidgetHandler
| Modifier and Type | Method and Description |
|---|---|
void |
onWebWidgetClose(FITAWebWidget widget,
java.lang.String productId,
java.lang.String size,
org.json.JSONObject details)
This method will be called when the user of the widget specifically requests closing of the widget by clicking on the close button.
|
void |
onWebWidgetInit(FITAWebWidget widget)
This method will be called when the widget instance inside the WebView is successfully created.
|
void |
onWebWidgetLoadError(FITAWebWidget widget,
java.lang.String description)
This method will be called when the widget inside the WebView fails to load or initialize for some reason.
|
void |
onWebWidgetOpen(FITAWebWidget widget,
java.lang.String productId)
This method will be called when the widget is successfully opened after the `open` method call.
|
void |
onWebWidgetProductLoad(FITAWebWidget widget,
java.lang.String productId,
org.json.JSONObject details)
This method will be called when the widget successfully loads the product info.
|
void |
onWebWidgetProductLoadError(FITAWebWidget widget,
java.lang.String productId,
org.json.JSONObject details)
This method will be called when the widget fails to load the product info or the product is not supported.
|
void |
onWebWidgetReady(FITAWebWidget widget)
This method will be called when the widget container inside the WebView is successfully loaded
and is ready to accept commands.
|
void |
onWebWidgetRecommend(FITAWebWidget widget,
java.lang.String productId,
java.lang.String size,
org.json.JSONObject details)
This method will be called after the `FITAWebWidget.recommend` call, when the widget has received and processed the size recommendation.
|
void onWebWidgetReady(FITAWebWidget widget)
widget - The widget controller instancevoid onWebWidgetInit(FITAWebWidget widget)
widget - The widget controller instancevoid onWebWidgetLoadError(FITAWebWidget widget, java.lang.String description)
widget - The widget controller instancedescription - Description of error, e.g. "net::ERR_TUNNEL_CONNECTION_FAILED"void onWebWidgetProductLoad(FITAWebWidget widget, java.lang.String productId, org.json.JSONObject details)
widget - The widget controller instanceproductId - The ID of the productdetails - The details objectvoid onWebWidgetProductLoadError(FITAWebWidget widget, java.lang.String productId, org.json.JSONObject details)
widget - The widget controller instanceproductId - The ID of the productdetails - The details objectvoid onWebWidgetOpen(FITAWebWidget widget, java.lang.String productId)
widget - The widget controller instanceproductId - The ID of the productvoid onWebWidgetClose(FITAWebWidget widget, java.lang.String productId, java.lang.String size, org.json.JSONObject details)
widget - The widget controller instanceproductId - The ID of the productsize - The recommended size of the product, if there was a recommendation. `null` if there wasn't any recommendation.details - The details object.void onWebWidgetRecommend(FITAWebWidget widget, java.lang.String productId, java.lang.String size, org.json.JSONObject details)
productId - The ID of the productsize - The recommended size of the product.details - The details object.