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; /*from w w w .j a v a 2 s . co m*/ import android.app.Activity; import com.heavyplayer.audioplayerrecorder.service.AudioPlayerService; public class AudioPlayerServiceManager extends ServiceManager { public AudioPlayerServiceManager(Activity activity) { this(activity, AudioPlayerService.class); } public <T extends AudioPlayerService> AudioPlayerServiceManager(Activity activity, Class<T> serviceClass) { super(activity, serviceClass); } @Override protected void onDeactivateService(boolean stopService) { if(stopService) { final AudioPlayerService.LocalBinder binder = getBinder(); if(binder != null) // Make sure the players are destroyed. binder.destroyPlayers(); } super.onDeactivateService(stopService); } public AudioPlayerService.LocalBinder getBinder() { return (AudioPlayerService.LocalBinder)super.getBinder(); } }