FileDocCategorySizeDatePackage
MediaSessionCompatApi21.javaAPI DocAndroid 5.1 API7563Thu Mar 12 22:22:56 GMT 2015android.support.v4.media.session

MediaSessionCompatApi21

public class MediaSessionCompatApi21 extends Object

Fields Summary
Constructors Summary
Methods Summary
public static java.lang.ObjectcreateCallback(android.support.v4.media.session.MediaSessionCompatApi21$Callback callback)

        return new CallbackProxy<Callback>(callback);
    
public static java.lang.ObjectcreateSession(android.content.Context context, java.lang.String tag)

        return new MediaSession(context, tag);
    
public static android.os.ParcelablegetSessionToken(java.lang.Object sessionObj)

        return ((MediaSession)sessionObj).getSessionToken();
    
public static booleanisActive(java.lang.Object sessionObj)

        return ((MediaSession)sessionObj).isActive();
    
public static voidrelease(java.lang.Object sessionObj)

        ((MediaSession)sessionObj).release();
    
public static voidsendSessionEvent(java.lang.Object sessionObj, java.lang.String event, android.os.Bundle extras)

        ((MediaSession)sessionObj).sendSessionEvent(event, extras);
    
public static voidsetActive(java.lang.Object sessionObj, boolean active)

        ((MediaSession)sessionObj).setActive(active);
    
public static voidsetCallback(java.lang.Object sessionObj, java.lang.Object callbackObj, android.os.Handler handler)

        ((MediaSession) sessionObj).setCallback((MediaSession.Callback) callbackObj, handler);
    
public static voidsetExtras(java.lang.Object sessionObj, android.os.Bundle extras)

        ((MediaSession) sessionObj).setExtras(extras);
    
public static voidsetFlags(java.lang.Object sessionObj, int flags)

        ((MediaSession)sessionObj).setFlags(flags);
    
public static voidsetMediaButtonReceiver(java.lang.Object sessionObj, android.app.PendingIntent pi)

        ((MediaSession) sessionObj).setMediaButtonReceiver(pi);
    
public static voidsetMetadata(java.lang.Object sessionObj, java.lang.Object metadataObj)

        ((MediaSession)sessionObj).setMetadata((MediaMetadata)metadataObj);
    
public static voidsetPlaybackState(java.lang.Object sessionObj, java.lang.Object stateObj)

        ((MediaSession)sessionObj).setPlaybackState((PlaybackState)stateObj);
    
public static voidsetPlaybackToLocal(java.lang.Object sessionObj, int stream)

        // TODO update APIs to use support version of AudioAttributes
        AudioAttributes.Builder bob = new AudioAttributes.Builder();
        bob.setLegacyStreamType(stream);
        ((MediaSession) sessionObj).setPlaybackToLocal(bob.build());
    
public static voidsetPlaybackToRemote(java.lang.Object sessionObj, java.lang.Object volumeProviderObj)

        ((MediaSession)sessionObj).setPlaybackToRemote((VolumeProvider)volumeProviderObj);
    
public static voidsetQueue(java.lang.Object sessionObj, java.util.List queueObjs)

        if (queueObjs == null) {
            ((MediaSession) sessionObj).setQueue(null);
            return;
        }
        ArrayList<MediaSession.QueueItem> queue = new ArrayList<MediaSession.QueueItem>();
        for (Object itemObj : queueObjs) {
            queue.add((MediaSession.QueueItem) itemObj);
        }
        ((MediaSession) sessionObj).setQueue(queue);
    
public static voidsetQueueTitle(java.lang.Object sessionObj, java.lang.CharSequence title)

        ((MediaSession) sessionObj).setQueueTitle(title);
    
public static voidsetSessionActivity(java.lang.Object sessionObj, android.app.PendingIntent pi)

        ((MediaSession) sessionObj).setSessionActivity(pi);
    
public static java.lang.ObjectverifySession(java.lang.Object mediaSession)

        if (mediaSession instanceof MediaSession) {
            return mediaSession;
        }
        throw new IllegalArgumentException("mediaSession is not a valid MediaSession object");
    
public static java.lang.ObjectverifyToken(java.lang.Object token)

        if (token instanceof MediaSession.Token) {
            return token;
        }
        throw new IllegalArgumentException("token is not a valid MediaSession.Token object");