As below code shows I have a function named record() I want to call this function with asynctask but I do not know how to work with asynctask, record function takes
record()
Make AsyncTask Class and write code there and call your AsyncTask Class by new AsyncTaskClass().execute();
AsyncTask
new AsyncTaskClass().execute();