Problem with development of application

Problem with development of application

BY 23 Jun 2016 Native Application Development

Dear Sir, I am doing a project under the Samsung developers team in Bangladesh. My project is building a tasker for Tizen users. I added a button in the project which initiates the wifi. But as soon a I press it, the app force closes itself. I am not able to find a solution to this problem. I would be really grateful if you can help me find a solution to this problem. I have given the code I used with this.

Evas_Object *box1 = elm_box_add(ad->conform);
    evas_object_size_hint_weight_set(ad->label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_object_content_set(ad->conform, box1);
	evas_object_show(box1);

	ad->wifi = elm_button_add(box1);
	evas_object_size_hint_weight_set(ad->wifi, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_object_content_set(box1, ad->wifi);
	elm_object_text_set(ad->wifi, "WiFi Init");
	evas_object_smart_callback_add(ad->wifi, "clicked", (Evas_Smart_Cb) bt_wifi, ad);
	elm_box_pack_end(box1, ad->wifi);
	evas_object_show(ad->wifi);

Thank You. 

Written by