aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005/dsub/util/compat/RemoteControlClientHelper.java
blob: ddaa9f4371ac16c673979488e539a2280e89f46f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package github.daneren2005.dsub.util.compat;

import github.daneren2005.dsub.domain.MusicDirectory;
import android.content.ComponentName;
import android.content.Context;
import android.os.Build;

public abstract class RemoteControlClientHelper {
	
	public static RemoteControlClientHelper createInstance() {
		if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
			return new RemoteControlClientBase();
		} else {
			return new RemoteControlClientICS();
		}
	}
	
	protected RemoteControlClientHelper() {
		// Avoid instantiation
	}
	
	public abstract void register(final Context context, final ComponentName mediaButtonReceiverComponent);
	public abstract void unregister(final Context context);
	public abstract void setPlaybackState(final int state);
	public abstract void updateMetadata(final Context context, final MusicDirectory.Entry currentSong);
	
}