+ }
+
+ void creat_down_BIN_fail()
+ {
+ if (Title == nullptr) {
+ Title = new UILabelExt();
+ }
+ Title->SetPosition(173, 51); // widget's left position and top position
+ Title->Resize(800, 88); // widget's width and height
+ Title->SetViewId("label1");// Set style
+ Title->SetStyle(STYLE_TEXT_FONT, 30);
+
+ // Set additional property
+ Title->SetText("传输失败");
+ // Title->SetTextId (STR_MP3_FAIL_TITL);
+ Title->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
+ Title->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ Title->SetRollSpeed(0);
+ Title->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+
+ // Add to rootView
+ UIViewGroup_transmitting->Add(Title);
+ Title->SetVisible(true);
+
+
+ if (label_ == nullptr) {
+ label_ = new UILabelExt();
+ }
+ label_->SetPosition(60, 281); // widget's left position and top position
+ label_->Resize(345, 101); // widget's width and height
+ label_->SetViewId("label2");// Set style
+ label_->SetStyle(STYLE_TEXT_FONT, 30);
+
+ // Set additional property
+ label_->SetText("app安装失败,请退出或重新安装");
+ // label_->SetTextId(STR_MP3_FAIL_LABEL);
+ label_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
+ label_->SetTextColor(Color::GetColorFromRGBA(0xAA, 0xAA, 0xAA, 0xff));
+ label_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ label_->SetRollSpeed(0);
+ label_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+
+
+
+ if (transmitting_img == nullptr)
+ {
+ transmitting_img = new UIImageView();
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemUpdateView::KUMILOGOImage new fail!");
+ }
+ transmitting_img->SetPosition(193, 150,80, 80);
+ const char *imagesPath = TRANSMITTING_FAIL_PATH;
+ transmitting_img->SetSrc(imagesPath);
+ UIViewGroup_transmitting->Add(transmitting_img);
+
+ // Add to rootView
+ UIViewGroup_transmitting->Add(label_);
+ label_->SetVisible(true);
+
+
+
}
case TRANS_BIN_SUCC:
creat_down_BIN_succ();
break;
-
+ case TRANS_BIN_FAIL:
+ creat_down_BIN_fail();
+ break;
default:
break;
static ble_read_data handle_l[MAX_HANDLE_NUM]={0};\r
errcode_t cancel_recv_file(uint8_t flag);\r
\r
+static char app_name[64]={0};\r
\r
uint8_t ble_dial_file_count=0;\r
uint8_t ble_dial_file_index=0;\r
buffer_handle->file_recv_stat.lrcvalue = 0;\r
buffer_handle->receive_file_flag = 1;\r
uapi_ble_connect_param_update(BLE_CONNECT_INTERVAL_HIGH);\r
- // TRANSMIT_DATA=TRANS_MP3_TRANSMITTING;\r
- // CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);\r
\r
return ERRCODE_SUCC;\r
}\r
buffer_handle->file_recv_stat.lrcvalue = 0;\r
buffer_handle->receive_file_flag = 1;\r
uapi_ble_connect_param_update(BLE_CONNECT_INTERVAL_HIGH);\r
- // TRANSMIT_DATA=TRANS_MP3_TRANSMITTING;\r
- // CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);\r
+\r
+ memset_s(app_name,64,0,64);\r
+ memcpy_s(app_name,64, buffer_handle->file_recv_stat.file_name,strlen(buffer_handle->file_recv_stat.file_name));\r
+ \r
\r
return ERRCODE_SUCC;\r
}\r