Watch face setting function
15.1Functional Overview
The dial functions mainly include the function of obtaining the watch screen information, the function of obtaining the information of the dial list, the function of setting the current dial information, and the function of transferring the dial file.
15.2 Dial Operation Properties
Parameters | Description | Notes |
---|---|---|
filePath | Dial file transfer path | str |
colorFormat | Color Format | int Device screen information interface acquisition |
blockSize | Compressed block size | int Device screen information interface acquisition |
15.3 Get screen information
- IDOWatchScreenInfoModel
Parameters | Description | Notes |
---|---|---|
familyName | Watch face family name | str |
width | width | int |
height | height | int |
colorFormat | Color Format | int |
size | size* 100 | int |
- Get current device screen information
Objc:
initWatchDialManager().getDialScreenInfo(^(IDOWatchScreenInfoModel * _Nullable model, int errorCode) {
if (errorCode == 0) {
//Get screen information successfully
}else if (errorCode == 6) {
// This feature is not supported
}else {
//Failed to get screen information
}
});
Swift:
initWatchDialManager().getDialListInfo!{(model,errorCode)in
if errorCode == 0{
//Get screen information successfully
}else if errorCode == 6 {
// This feature is not supported
}else {
//Failed to get screen information
}
};
15.4 Get a list of V2 watch faces
- IDOWatchDialInfoItemModel
Parameters | Description | Notes |
---|---|---|
fileName | Watch face name | str (unique identifier) |
operate | Operation | 0x00: Query the watch face in use 0x01: Set the watch face 0x02: Delete the watch face |
- IDOWatchDialInfoModel
Parameters | Description | Notes |
---|---|---|
fileCount | Number of files | int |
remainingSpace | Remaining space | int |
fileMaxSize | Maximum size of a single file | int |
currentDialName | Currently set watch face name | str |
dialArray | A collection of all dial information of the current bracelet | array |
- Get all the dial information of v2
Objc:
initWatchDialManager().getDialListInfo(^(IDOWatchScreenInfoModel * _Nullable model, int errorCode) {
if (errorCode == 0) {
//Get dial information successfully
}else if (errorCode == 6) {
// This feature is not supported
}else {
//Failed to get dial information
}
});
Swift:
initWatchDialManager().getDialListInfo!{(model,errorCode)in
if errorCode == 0{
//Get screen information successfully
}else if errorCode == 6 {
// This feature is not supported
}else {
//Failed to get screen information
}
};
- Get the current dial name of v2
Objc:
initWatchDialManager().getCurrentDialInfo(^(NSString * _Nullable fileName, int errorCode) {
if (errorCode == 0) {
//Get the current dial information successfully
}else if (errorCode == 6) {
// This feature is not supported
}else {
//Failed to get current dial information
}
});
Swift:
initWatchDialManager().getCurrentDialInfo!{(name,errorCode)in
if errorCode == 0{
//Get the current dial information successfully
}else if errorCode == 6 {
// This feature is not supported
}else {
//Failed to get current dial information
}
};
15.5 v2 Set the current watch face
- IDOWatchDialInfoItemModel
Parameters | Description | Notes |
---|---|---|
fileName | Watch face name | str (unique identifier) |
operate | Operation | 0x00: Query the watch face in use 0x01: Set the watch face 0x02: Delete the watch face |
Objc:
IDOWatchDialInfoItemModel * model = [[IDOWatchDialInfoItemModel alloc]init];
initWatchDialManager().setCurrentDial(^(int errorCode) {
if (errorCode == 0) {
//Set the current watch face successfully
}else if (errorCode == 6) {
// This feature is not supported
}else {
// Failed to set the current dial
}
}, model);
Swift:
let model = IDOWatchDialInfoItemModel.init()
initWatchDialManager().setCurrentDial!{(errorCode)in
if errorCode == 0{
//Set the current watch face successfully
}else if errorCode == 6 {
// This feature is not supported
}else {
// Failed to set the current dial
}
}(model)
15.6 Get a list of V3 watch faces
//Get v3 watch face list menu
__IDO_FUNCTABLE__.funcTable35Model.getNewWatchList
- IDOV3WatchDialInfoModel
Parameters | Description | Notes |
---|---|---|
localWatchNum | Total number of local watch faces | int |
cloudWatchNum | Total number of cloud watch faces | int |
wallpaperWatchNum | Total number of wallpaper dials | int |
useCloudWatchNum | Used number of cloud watch faces | int |
useWallpaperWatchNum | The number of used wallpaper dials | int |
currentWatchName | The name of the watch face that is currently set | int |
watchFrameVersion | Framework version numbers start at 1 | int |
fileMaxSize | Maximum single file | KB |
watchListNum | Number of all watch faces of the current watch | int |
watchTotalSize | Total capacity of the watch face | Unit: Byte |
watchUsedSize | Used capacity of the watch face | Unit: Byte |
maxDownloadSpaceSize | Maximum available watch face download contiguous space size | Unit: Byte |
dialArray | All watch face information of the current watch | IDOV3WatchDialInfoItemModel Collection |
- IDOV3WatchDialInfoItemModel
Parameters | Description | Notes |
---|---|---|
type | Dial Type | 1: Normal dial; 2: Wallpaper dial; 3: Cloud dial |
watchVersion | Dial version number | Cloud watch face works |
sortNumber | Dial sequence number | int starts at 0 |
size | watch face file size | int |
Objc:
initWatchDialManager().getV3WatchListInfo(^(IDOV3WatchDialInfoModel * _Nullable model, int errorCode) {
if (errorCode == 0) {
//Obtained v3 dial list information successfully
}else if (errorCode == 6) {
// This feature is not supported
}else {
//Failed to get v3 dial list information
}
});
Swift:
initWatchDialManager().getV3WatchListInfo!((mode,errorCode)in {
if errorCode == 0{
//Obtained v3 dial list information successfully
}else if errorCode == 6 {
// This feature is not supported
}else {
//Failed to get v3 dial list information
}
})
15.7 Set watch face sorting
//Set the watch face sorting menu
__IDO_FUNCTABLE__.funcTable34Model.watchDialSort
- IDOV3WatchDialInfoModel
Parameters | Description | Notes |
---|---|---|
watchListNum | Number of all watch faces of the current watch | int |
dialArray | All watch face information of the current watch | IDOV3WatchDialInfoItemModel Collection |
- IDOV3WatchDialInfoItemModel
Parameters | Description | Notes |
---|---|---|
type | Dial Type | 1: Normal dial; 2: Wallpaper dial; 3: Cloud dial |
watchVersion | Watch face version number | Cloud watch face works |
sortNumber | Dial sequence number | int starts at 0 |
size | watch face file size | int |
Objc:
IDOV3WatchDialInfoModel * dialModel = [IDOV3WatchDialInfoModel currentModel];
initWatchDialManager().setWatchDialSort(^(int errorCode) {
if (errorCode == 0) {
//Set dial sorting successfully
}else if (errorCode == 6) {
// This feature is not supported
}else {
// Failed to set dial sorting
}
}, dialModel);
Swift:
initWatchDialManager().setWatchDialSort!((errorCode)in{
if errorCode == 0 {
//Set dial sorting successfully
}else if errorCode == 6 {
// This feature is not supported
}else {
// Failed to set dial sorting
}
})
15.8 Watch face file transfer function
Objc:
initWatchDialManager().colorFormat = model.colorFormat;
initWatchDialManager().blockSize = model.blockSize;
initWatchDialManager().addDialProgress(^(int progress) {
//Dial transfer progress (0-100)
}).addDialTransfer(^(int errorCode,int finishingTime) {
if (errorCode == 0) {
//transfer complete
}else if (errorCode == 6) {
// do not support transmission
}else {
//Transfer failed
}
}).filePath = filePath;
[IDOWatchDialManager startDialTransfer];
Swift:
initWatchDialManager().colorFormat = model.colorFormat;
initWatchDialManager().blockSize = model.blockSize;
initWatchDialManager().addDialProgress!{(progress)in
//Dial transfer progress (0-100)
}.addDialTransfer!{(errorCode,finishingTime)in
if errorCode == 0{
//transfer complete
}else if errorCode == 6{
// do not support transmission
}else {
//Transfer failed
}
}.filePath = filePath;
IDOWatchDialManager.startDialTransfer();