The Value-Added Services (VAS) UI BizBundle offers a range of IP camera (IPC) value-added services within the framework of IPC Value-Added Services v2.0. This BizBundle provides all the features needed by end users when purchasing and using value-added services, such as product display, placing orders, checking service details, and viewing order status.
By connecting to the IPC VAS BizBundle, you can easily integrate and use various value-added services, including IPC cloud storage, managed services, video inspection, 4G data plans, and AI event services.
To use Value-Added Services v2.0, you need to update the SDK and UI BizBundle to version 5.17.0 or later.
Before integration, review the UI BizBundle setup and integration steps. For more information, see Integrate with Framework.
Add the following dependencies to the build.gradle module:
dependencies {
api enforcedPlatform("com.thingclips.smart:thingsmart-BizBundlesBom:${biz_bom_version}")
api "com.thingclips.smart:thingsmart-bizbundle-camera"
api "com.thingclips.smart:thingsmart-bizbundle-miniapp"
api "com.thingclips.smart:thingsmart-bizbundle-homekit"
api "com.thingclips.smart:thingsmart-bizbundle-ipckit"
api "com.thingclips.smart:thingsmart-ipcsdk:${ipc_sdk_version}}"
//... Other configuration
api "com.thingclips.smart:thingsmart: ${sdk_version}}"
}
We recommend using the miniapp UI BizBundle for better performance and user experience.
Please switch to the miniapp UI BizBundle because the H5 VAS BizBundle is no longer updated.
UrlRouter.execute(urlBuilder).API description
void fetchValueAddedServiceUrl(CameraVASParams params, OperationCallBack callback);
| Parameter | Type | Description |
|---|---|---|
| params | CameraVASParams | The request parameters. |
| callback | OperationCallBack | The callback. |
CameraVASParams
| Parameter | Type | Description |
|---|---|---|
| devId | String | The ID of the device. |
| spaceId | String | The space ID, passing homeId. |
| languageCode | String | The standard language code. |
| hybridType | int | The program type, ThingIPCConstant. |
| categoryCode | String | The VAS category code, ThingIPCConstant. |
| extInfo | Object | The extended information. |
VAS category code constant
| ThingIPCConstant constant | Description |
|---|---|
| ThingIPCConstant.CATEGORY_CODE_SECURITY_CLOUD_SERVICE | The cloud storage service. |
| ThingIPCConstant.CATEGORY_CODE_AI_SERVICE | The AI event service. |
| ThingIPCConstant.CATEGORY_CODE_TRAFFIC_SERVICE | The 4G traffic top-up service. |
| ThingIPCConstant.CATEGORY_CODE_AI_INSPECTION_SERVICE | The inspection report service. |
Program type constant
| ThingIPCConstant constant | Description |
|---|---|
| ThingIPCConstant.HYBRID_TYPE_H5 | The H5 page. |
| ThingIPCConstant.HYBRID_TYPE_MINI_APP | The miniapp. |
API description
void fetchInspectionDetailUrl(CameraVASInspectionParams params, OperationCallBack callback);
| Parameter | Type | Description |
|---|---|---|
| params | CameraVASInspectionParams | The request parameters. |
| callback | OperationCallBack | The callback. |
CameraVASInspectionParams
| Field | Type | Description |
|---|---|---|
| spaceId | String | The space ID, passing homeId. |
| devId | String | The ID of the device. |
| time | long | The time, retrieved from CameraMessageBean. |
| reportId | String | The report ID, which is inspectionReportId in getExtendParams of CameraMessageBean. |
| languageCode | String | The standard language code. |
| hybridType | int | The program type, ThingIPCConstant. |
| extInfo | Object | The extended information. |
Sample code
CameraVASParams cameraVASParams = new CameraVASParams();
cameraVASParams.devId = mDevId;
cameraVASParams.spaceId = FamilyManagerUtils.getCurrentHomeId()+"";
cameraVASParams.languageCode = "zh";
cameraVASParams.categoryCode = ThingIPCConstant.CATEGORY_CODE_AI_INSPECTION_SERVICE;
cameraVASParams.hybridType = ThingIPCConstant.HYBRID_TYPE_MINI_APP;
ThingIPCSdk.getIPCVAS().fetchValueAddedServiceUrl(cameraVASParams, new OperationCallBack(){
@Override
public void onSuccess(int sessionId, int requestId, String data, Object camera) {
Bundle bundle = new Bundle();
bundle.putString("url", data);
UrlBuilder builder = new UrlBuilder(mContext, "miniApp").putExtras(bundle);
UrlRouter.execute(builder);
}
@Override
public void onFailure(int sessionId, int requestId, int errCode, Object camera) {
}
});
// Inspection report
CameraMessageBean *messageBean;
CameraVASInspectionParams params = new CameraVASInspectionParams();
params.devId = mDevId;
params.spaceId = FamilyManagerUtils.getCurrentHomeId()+"";
params.languageCode = "zh";
params.time = messageBean.getTime();
params.reportId = messageBean.getExtendParams() == null ? "" : String.valueOf(messageBean.getExtendParams().get("inspectionReportId"));
params.hybridType = ThingIPCConstant.HYBRID_TYPE_MINI_APP;
ThingIPCSdk.getIPCVAS().fetchInspectionDetailUrl(params, new OperationCallBack(){
@Override
public void onSuccess(int sessionId, int requestId, String data, Object camera) {
Bundle bundle = new Bundle();
bundle.putString("url", data);
UrlBuilder builder = new UrlBuilder(mContext, "miniApp").putExtras(bundle);
UrlRouter.execute(builder);
}
@Override
public void onFailure(int sessionId, int requestId, int errCode, Object camera) {
}
});
Before proceeding to the cloud storage purchase page, verify whether your device supports the cloud storage service. For more information, see Support for cloud storage.
After activating cloud storage, you can view and play videos stored in the cloud. For more information about APIs, see Cloud Storage.
IPC SDK 7.5.4 or later supports this API.
This API returns navigation URLs for IPC value-added service pages under the IPC VAS framework. Compared with the previous API, it supports a wider range of pages, including the service marketplace homepage, product page, application page, setting page, orders page, service page, and redemption page.
| Service Category | Marketplace Homepage | Product Page | Application Page | Setting Page | My Services | My Orders | Redemption Codes |
|---|---|---|---|---|---|---|---|
| Cloud Storage | Yes | Yes | No | Yes | Yes | Yes | Yes |
| AI Alert | Yes | Yes | Yes | Yes | |||
| Bird Identification | Yes | Yes | No | Yes | |||
| Video Inspection | Yes | Yes | Yes | Yes | |||
| Highlights | Yes | Yes | Yes | Yes | |||
| Pet Know | Yes | Yes | Yes | No | |||
| 4G Data Top-up | Yes | Yes | No | No |
void fetchValueAddedServiceUrlV2(CameraVASParamsV2 params, OperationCallBack callback);
| Parameter | Type | Description |
|---|---|---|
| params | CameraVASParamsV2 | Request parameters. |
| callback | OperationCallBack | The callback. |
| Field | Type | Description |
|---|---|---|
| homeId | String | The home ID. |
| devId | String | The device ID. |
| sceneCode | String | The scene code. |
| categoryCode | String | The category code. |
| params | Map<String, String>? | The extended parameters. |
| categoryCode value | Description |
|---|---|
| security_cloud_service | Cloud storage |
| ai_alert | AI alert |
| ai_service | Bird identification |
| ai_inspection_service | Video inspection |
| ai_highlight_moments | Highlights |
| ai_pet_know | Pet know |
| traffic_service | 4G data top-up |
| sceneCode | Description |
|---|---|
| homePage | Homepage |
| commodityPage | Product page |
| applicationPage | Application page |
| setupPage | Setting page |
| servicePage | My services |
| orderPage | My orders |
| subscribePage | Subscription page |
| redeemPage | Redemption codes |
In addition to the required request parameters, some pages support extended parameters. Pass them as key-value pairs in the params field.
Currently, only the My Orders page supports the activityKey parameter.
| Parameter | Type | Description |
|---|---|---|
| activityKey | String | order selects the Orders tab. sub selects the Subscriptions tab. If not specified, the Orders tab is selected by default. |
val requestParam = CameraVASParamsV2()
requestParam.homeId = homeId.toString()
requestParam.devId = deviceId
requestParam.sceneCode = "security_cloud_service"
requestParam.categoryCode = "homePage"
requestParam.params = mutableMapOf<String, String>()
ThingIPCSdk.getIPCVAS().fetchValueAddedServiceUrlV2(requestParam, object : OperationCallBack {
override fun onSuccess(sessionId: Int, requestId: Int, data: String?, camera: Any?) {
UrlRouter.execute(this, "thingSmart://miniApp?url=$data")
}
override fun onFailure(sessionId: Int, requestId: Int, errCode: Int, camera: Any?) {
// Processes errors.
}
})
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback