};
static bool is_not_supported = false;
-static const char *remote_address = "B8:5E:7B:E7:92:7D";
+static const char *remote_address;
static void _app_destroy_cb(void* this);
static void Bluetooth_bt_device_bond_created_cb_p(int result, bt_device_info_s * device_info, void *user_data);
static void Bluetooth_bt_device_bond_destroyed_cb_p(int result, char *remote_address, void *user_data);
elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD);
char resultc[256] ={0,};
+ sprintf(resultc, "result = %s", "Maually ON bluetooth and pair this device with some other device");
+ ui_utils_label_set_text(this->create_label, resultc, "left");
ret = bt_device_set_bond_created_cb(Bluetooth_bt_device_bond_created_cb_p, this);
DBG("bt_device_set_bond_created_cb %d", ret);
RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
elm_object_text_set(popup, "Bluetooth is not supported");
RETVM_IF(!this->view, NULL,"Bluetooth is not supported");
}
- ret = bt_device_create_bond(remote_address);
- DBG("bt_device_create_bond %d", ret);
- sprintf(resultc, "result = %s", get_bluetooth_error(ret));
- ui_utils_label_set_text(this->create_label, resultc, "left");
+ //ret = bt_device_create_bond(remote_address);
+ //DBG("bt_device_create_bond %d", ret);
+ //sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+ //ui_utils_label_set_text(this->create_label, resultc, "left");
}
else if (this->view->tbt_info->apptype == TBT_APP_BT_CALLBACK_DESTROY_BOND_TEST)
//ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>Test Type One<br/>1.Bluetooth On<br/>2. Destroy Bonding callback Invoked<br/><br/>Test Type Two<br/>1. Bluetooth Off<br/>2. Correct Error Message Displayed<br/><b>Note:You can also refer info section");
char resultc[256] ={0,};
- ret = bt_device_set_bond_destroyed_cb(Bluetooth_bt_device_bond_destroyed_cb_p, this);
- RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
+ sprintf(resultc, "result = %s", "Maually ON bluetooth and invoke destroy bond callback");
+ ui_utils_label_set_text(this->create_label, resultc, "left");
+ ret = bt_device_set_bond_created_cb(Bluetooth_bt_device_bond_created_cb_p, this);
+ DBG("bt_device_set_bond_created_cb %d", ret);
+ RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
+
+ //ret = bt_device_set_bond_destroyed_cb(Bluetooth_bt_device_bond_destroyed_cb_p, this);
+ //RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
if(ret == BT_ERROR_NOT_SUPPORTED)
{
elm_object_text_set(popup, "Bluetooth is not supported");
RETVM_IF(!this->view, NULL,"Bluetooth is not supported");
}
- ret = bt_device_create_bond(remote_address);
- DBG("bt_device_create_bond %d", ret);
- sprintf(resultc, "result = %s", get_bluetooth_error(ret));
- ui_utils_label_set_text(this->create_label, resultc, "left");
-
- ret = bt_device_destroy_bond(remote_address);
- sprintf(resultc, "result = %s", get_bluetooth_error(ret));
- ui_utils_label_set_text(this->create_label, resultc, "left");
+ //ret = bt_device_create_bond(remote_address);
+ //DBG("bt_device_create_bond %d", ret);
+ //sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+ //ui_utils_label_set_text(this->create_label, resultc, "left");
+
+ //ret = bt_device_destroy_bond(remote_address);
+ //sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+ //ui_utils_label_set_text(this->create_label, resultc, "left");
}
else if (this->view->tbt_info->apptype == TBT_APP_BT_CALLBACK_DISCOVER_DEVICES_TEST)
char resultc[256] ={0,};
sprintf(resultc, "CreateBonding Callback Invoked with result = %s", get_bluetooth_error(result));
ui_utils_label_set_text(this->create_label, resultc, "left");
+ remote_address = device_info->remote_address;
+ if (this->view->tbt_info->apptype == TBT_APP_BT_CALLBACK_DESTROY_BOND_TEST)
+ {
+ int ret = bt_device_set_bond_destroyed_cb(Bluetooth_bt_device_bond_destroyed_cb_p, this);
+ //RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
+ ret = bt_device_destroy_bond(device_info->remote_address);
+ sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+ ui_utils_label_set_text(this->create_label, resultc, "left");
+ }
+
}
/**