views:

44

answers:

0

It works great on emulator but when i try it on Samsung Galaxy S, ProgressDialog keeps showing untill to force close the application.

@Override
public void onCreate(Bundle savedInstanceState) {
                    .
                    .
                    .
         pd = ProgressDialog.show(this, "Working..", "Searching for words !", true,false);
         Thread thread = new Thread(this);
        thread.start() ;
}

public void run() {         
                    .
                    .
                    .
     handler.sendEmptyMessage(0);
}

private Handler handler = new Handler() {
                @Override
                public void handleMessage(Message msg) {
                    .
                    .
                    .
                    .
                    pd.dismiss();

                }
};