Languages

Menu
Sites
Language
Problem with development of application

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. 

Edited by: Shafee Chowdhury on 23 Jun, 2016

Responses

2 Replies
Farhan Alam

Here is the code for the button

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);


 

Mehedi Alamgir

I tested your Button code in my device . I created your “bt_wifi” callback function with a demo implementation  . It works fine in my device .  I think your callback implementation may casues your “app forcefully close”  problem.  

Please share your callback function. It will be helpful to solve  your problem.