Back to project page gig-radio-android.
The source code is released under:
GNU General Public License
If you think the Android project gig-radio-android 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.getgigradio.gigradio.playback; //from ww w.j a v a 2 s . co m import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class AudioBecomingNoisyReceiver extends BroadcastReceiver { public AudioBecomingNoisyReceiver() { } public void onReceive(Context ctx, Intent intent) { if (intent.getAction().equals( android.media.AudioManager.ACTION_AUDIO_BECOMING_NOISY)) { Intent pauseIntent = new Intent(ctx, MediaPlayerService.class); pauseIntent.setAction(MediaPlayerService.START_PAUSE); ctx.startService(pauseIntent); } } }