how to make app minimize with back button : I need to minimize app after user info input with back button.
What i do wrong

There's the back button code

 backButton.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {

                if (sendThread != null) {
                    
                    //sendThread.cancel();
                }
                if (receiveThread != null) {
                    
                    //receiveThread.cancel();
                }
                //acceptThread = new AcceptConnection();
                //acceptThread.start();
                textsListAdapter.clear();
                viewFlipper.showPrevious();
                deviceArrayAdapter.clear();
            }

        });