This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImageAdapter extends BaseAdapter { | |
private Context mContext; | |
private File[] filesArray; | |
public ImageAdapter(Context c, File dir) { | |
mContext = c; | |
//get the contents of the directory that you pass in through the constructor | |
filesArray = new dir.listFiles(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.media.RemoteControlClient; | |
import android.os.Build; | |
import android.support.v4.media.session.MediaSessionCompat; | |
import android.support.v4.media.session.PlaybackStateCompat; | |
public class MediaSessionHelper { | |
public static void applyState(MediaSessionCompat session, PlaybackStateCompat playbackState) { | |
session.setPlaybackState(playbackState); |