壁纸文件更新
13.1功能概述
此功能可以动态更新手环的壁纸,根据获取的手环屏幕信息,传输对应大小尺寸的图片。
13.2壁纸表盘操作
- IDOV3WallpaperDialInfoModel
参数 | 说明 | 备注 |
---|---|---|
operate | 操作类型 | 0x00:查询, 0x01:设置, 0x02: 删除壁纸表盘 |
location | 位置 | 0:无效 1:表盘(上左)参考九宫格 2:表盘(上中) 3:表盘(上右) 4:表盘(中左) 5:表盘(中中) 6:表盘(中右) 7:表盘(下左) 8:表盘(下中) 9:表盘(下右) |
hideType | 隐藏类型 | 0:全部显示 1:隐藏子控件(图标和数字) |
widgetType | 组件类型 | 0:无效 1:星期/日期 2:步数 3:距离 4:卡路里 5:心率 6:电量 |
timeColor | 时间颜色 | 白色: #FFFFFF 黑色:#000000 红色:#FC1E58 棕色:#FF9501 天蓝色:#0091FF 青绿色:#44D7B6 |
widgetIconColor | 组件图标颜色 | 白色: #FFFFFF 黑色:#000000 红色:#FC1E58 棕色:#FF9501 天蓝色:#0091FF 青绿色:#44D7B6 |
widgetNumColor | 组件数字颜色 | 白色: #FFFFFF 黑色:#000000 红色:#FC1E58 棕色:#FF9501 天蓝色:#0091FF 青绿色:#44D7B6 |
- 获取当前设备壁纸表盘信息
Objc:
initWatchDialManager().getWallpaperDialInfo(^(IDOV3WallpaperDialInfoModel * _Nullable model, int errorCode) {
if (errorCode == 0) {
//获取壁纸表盘信息成功
}else if (errorCode == 6) {
//不支持获取壁纸表盘信息
}else {
//获取壁纸表盘信息失败
}
});
Swift:
initWatchDialManager().getWallpaperDialInfo!{(model,errorCode)in {
if errorCode == 0 {
//获取壁纸表盘信息成功
}else if errorCode == 6 {
//不支持获取壁纸表盘信息
}else {
//获取壁纸表盘信息失败
}
}
- 设置当前设备壁纸表盘信息
Objc:
IDOV3WallpaperDialInfoModel * model = [IDOV3WallpaperDialInfoModel currentModel];
initWatchDialManager().setWallpaperDialInfo(^(int errorCode) {
if (errorCode == 0) {
//设置壁纸表盘信息成功
}else if (errorCode == 6) {
//不支持设置壁纸表盘信息
}else {
//设置壁纸表盘信息失败
}
}, model)
Swift:
let model = IDOV3WallpaperDialInfoModel.current()
initWatchDialManager().setWallpaperDialInfo!{(errorCode)in
if errorCode == 0 {
//设置壁纸表盘信息成功
}else if errorCode == 6 {
//不支持设置壁纸表盘信息
}else {
//设置壁纸表盘信息失败
}
}(model)
13.3壁纸传输更新方法
Objc:
initMakePhotoManager().fileName = fileName;
initMakePhotoManager().filePath = filePath;
initMakePhotoManager().addPhotoProgress(^(int progress) {
//更新文件进度(0-100)
}).addPhotoTransfer(^(int errorCode) {
if(errorCode == 0) {
//文件传输成功
}else {
//文件传输失败
}
});
[IDOMakePhotoManager startPhotoTransfer];
Swift:
initMakePhotoManager().fileName = fileName;
initMakePhotoManager().filePath = filePath;
initMakePhotoManager().addPhotoProgress!{(progress)in
//更新文件进度(0-100)
}.addPhotoTransfer!{(errorCode)in
if errorCode == 0 {
//文件传输成功
}else {
//文件传输失败
}
};
IDOMakePhotoManager.startPhotoTransfer();