Android SDK
Initialization

Initialization

Initialize SDK

ℹ️

serverInfo is optional. If not provided, it will be automatically selected based on the region of the mobile phone.

import com.gizwits.smart.sdk.common.GizConfiguration
import com.gizwits.smart.sdk.common.ProductInfoStruct
 
import com.gizwits.smart.sdk.GizSDKManager
GizSDKManager.initSDK(
  GizConfiguration(
      appID = "xxx",
      appSecret = "xxx",
      productInfos = listOf(
          ProductInfoStruct("xxx","xxx"),
      ),
      serverInfo = null
  )
)

China Mobile AiJia Module Discovery

productInfos supports the optional cmbDeviceTypeId. For China Mobile AiJia CMB BLE devices, supply the device type ID so the SDK can map advertisements to products. Omit it for ordinary devices.

val productInfo = ProductInfoStruct(
    productKey = "PK", productSecret = "PS", cmbDeviceTypeId = "DEVICE_TYPE_ID"
)