AlertDialog not working as expected
<p>I am implementing an android app.My problem no wis that when I send the data from the client to the server I want the client to know that the data was sent successfully. I have implemented an AlertDialog but when I send the data,I get a message "Can't create handler inside thread that has not called Looper.prepare()". I have attached my code below.</p>

<pre><code>    private void saveOrder(final Order order) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
            try {
                getConnection().saveOrder(order);
                handleSuccessSaveOrder();
            }
            catch (Exception exc) {
                Log.d("--- ERROR ---", exc.getMessage());
                handleException(exc.getMessage());
            }
        }
    });
    thread.start();
}

private void handleSuccessSaveOrder() {
    showAlert(Farsi.Convert(" j "),R.drawable.warning);
    //showActivity(MainMenuActivity.class);
}

private void showAlert(String message, int iconId) {
    alert = new AlertDialog.Builder(ReviewOrderActivity.this);
    alert.setTitle("Status Dialog");
    alert.setMessage(message);
    alert.setIcon(iconId);

      alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface arg0, int arg1) {
      showActivity(MainMenuActivity.class); } });


    alert.show();

}
</code></pre>
