Back to project page ambient-nights.
The source code is released under:
MIT License
If you think the Android project ambient-nights 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.cs371mproject.ambientnights.player; //w w w . ja va 2s. c o m import android.content.Context; import android.content.Intent; public class PlayerIntentReceiver extends android.content.BroadcastReceiver { public void onReceive(Context ctx, Intent intent) { if (intent.getAction().equals( android.media.AudioManager.ACTION_AUDIO_BECOMING_NOISY)) { Intent myIntent = new Intent(ctx, Player.class); ctx.stopService(myIntent); } } }