Back to project page AudioPlayerRecorder.
The source code is released under:
MIT License
If you think the Android project AudioPlayerRecorder listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.heavyplayer.audioplayerrecorder.service.manager; //w w w . jav a2s .co m import android.app.Activity; import com.heavyplayer.audioplayerrecorder.service.AudioRecorderService; public class AudioRecorderServiceManager extends ServiceManager { public AudioRecorderServiceManager(Activity activity) { super(activity, AudioRecorderService.class); } @Override protected void onDeactivateService(boolean stopService) { if(stopService) { final AudioRecorderService.LocalBinder binder = getBinder(); if(binder != null) // Force recorder stop, to make sure the output file is ready to be read. binder.destroyRecorder(); } super.onDeactivateService(stopService); } public AudioRecorderService.LocalBinder getBinder() { return (AudioRecorderService.LocalBinder)super.getBinder(); } }