Android: How to create fade-in/fade-out sound effects for any music file that my app plays?

This is my entire handler class for Android MediaPlayer. Look at the play() and pause() functions. Both contain the ability to either fade or not. The updateVolume() function was the key to let the sound increase/decrease linearly. package com.stackoverflow.utilities; import java.io.File; import java.util.Timer; import java.util.TimerTask; import android.content.Context; import android.media.MediaPlayer; import android.net.Uri; public class MusicHandler { … Read more