Android SDK 2.0文档 8-新旧SDK兼容手册
1. 兼容目的由于机智云品牌规范要求,新版SDK的类名前缀由XPG变更为Giz,因此APP需要相应修改类名前缀。
2. 兼容方法
[*]把所有已废弃接口,替换成1.6.2 SDK的最新接口
[*]把App工程中的SDK,更换成 2.00.00 SDK,如下图:
http://docs.gizwits.com/attachments/download/778563/001576cb3936d57cb170fde3209df95/?filename=blob.png
[*]
[*]把类名中的XPG前缀改为Giz
以下表格列出了所有需要变更类名的接口:
【GizWifiSDK】
public void didSetDeviceWifi(int error, XPGWifiDevice device)
public void didSetDeviceWifi(int error, GizWifiDevice device)
public void didGetSSIDList(int error, List<XPGWifiSSID> ssidInfoList)
public void didGetSSIDList(int error, List<GizWifiSSID> ssidInfoList)
public void didDiscovered(int error, List<XPGWifiDevice> devicesList)
public void didDiscovered(int error, List<GizWifiDevice> devicesList)
【GizWifiDevice】
public void didQueryHardwareInfo(XPGWifiDevice device, int result, ConcurrentHashMap<String, String> hardwareInfo)
public void didQueryHardwareInfo(GizWifiDevice device, int result, ConcurrentHashMap<String, String> hardwareInfo)
public void didDeviceOnline(XPGWifiDevice device, boolean isOnline)
public void didDeviceOnline(GizWifiDevice device, boolean isOnline)
public void didLogin(XPGWifiDevice device, int result)
public void didLogin(GizWifiDevice device, int result)
public void didDisconnected(XPGWifiDevice device, int result)
public void didDisconnected(GizWifiDevice device, int result)
public void didReceiveData(XPGWifiDevice device, ConcurrentHashMap<String, Object> dataMap, int result)
public void didReceiveData(GizWifiDevice device, ConcurrentHashMap<String, Object> dataMap, int result)
【GizWifiCentralControlDevice】
public void didDiscovered(int error, List<XPGWifiSubDevice> subDeviceList)
public void didDiscovered(int error, List<GizWifiSubDevice> subDeviceList)
【GizWifiBinary】
XPGWifiBinary
GizWifiBinary
页:
[1]