Friday, 15 June 2012

java - stop recording in service android -



java - stop recording in service android -

i have application, in runs service. service includes 2 things: -getting readings bluetooth. -record sound file.

for recording, using code posted : http://www.androiddevblog.net/android/android-audio-recording-part-2

i found link in 1 of questions posted in website. if can check code, find there 2 main functions recording: startrecording(), , stoprecording().

there activity "main_activity" start , close buttons. start button enables service, , calls startrecording function, , gets readings oximeter.

my question is: should phone call stoprecording function? in destroy() function of service? within close button in "main_activity"?

i have tried both. in first way, stoprecording function not finish, i,e, recording generates raw file, , stoprecording re-create , convert wav file.

in sec way, button hangs :s

your help appreciated

thanks, toleen

java android

No comments:

Post a Comment