I'm using the MediaPlayer Class to play an alert sound in my app. My problem is that if the user is listening to music through another application, the sound emitted by my MediaPlayer Class may not be perceived. Is it possible to momentarily lower the sound of other applications (just like the NotificationManager class)?
MediaPlayer mediaPlayer = MediaPlayer.create(getApplicationContext(), R.raw.alert_19);
mediaPlayer.start();