I want to create app in which when i click one time on button, audio recording should start for particular time (say 20 seconds) and then it should automatically stop the recording and it ask the user to save audio with edit text to enter name of audio.
Now the problem is what i want to implement is when user double click on same button, audio recording should start for 40 seconds and then same thing it should automatically stop after 40 seconds and then it ask the user's to enter the name of audio.
So i am confused in how to implement that when user click one time then recording start for 20 seconds and if it double clicked recording start for 40 seconds.
If any one have any idea or sample application or anything then please help me. I have searched a lot but not getting any solution from any where.