You can write the actual recording code or you could leverage existing voice recorder application in your phone... Most phones have a default recorder app....
Call startActivityForResult with corresponding action. The following is the code.
Intent recordIntent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(recordIntent, REQUEST_CODE_RECORD);