I would like to execute my `beginrecording()` method after countdown timer gets end. But both methods are executing at same time. can anyone help me to solve this.
my code is follows here:

```
StartBtn.setOnClickListener(new OnClickListener() {
            public void onClick(View view)
            { 
                //setContentView(textState);

                MyCount counter = new MyCount(6000, 1000, textState);

                StartBtn.setVisibility(4);
                counter.start();            

                    try
                    {
                    //  Thread.sleep(2000);
                        beginRecording();
                        EndBtn.setVisibility(0);

                    }
                    catch(Exception e)
                    {
                        e.printStackTrace();
                    }                               
            }

        });

```

thanks in advance