IT. Expert System.

Android Reference

MediaRouter.RouteInfo


android.media

Class MediaRouter.RouteInfo

    • Field Detail

      • PLAYBACK_TYPE_LOCAL

        public static final int PLAYBACK_TYPE_LOCAL
        The default playback type, "local", indicating the presentation of the media is happening on the same device (e.g. a phone, a tablet) as where it is controlled from.
        See Also:
        #setPlaybackType(int), Constant Field Values
      • PLAYBACK_TYPE_REMOTE

        public static final int PLAYBACK_TYPE_REMOTE
        A playback type indicating the presentation of the media is happening on a different device (i.e. the remote device) than where it is controlled from.
        See Also:
        #setPlaybackType(int), Constant Field Values
      • PLAYBACK_VOLUME_FIXED

        public static final int PLAYBACK_VOLUME_FIXED
        Playback information indicating the playback volume is fixed, i.e. it cannot be controlled from this object. An example of fixed playback volume is a remote player, playing over HDMI where the user prefers to control the volume on the HDMI sink, rather than attenuate at the source.
        See Also:
        #setVolumeHandling(int), Constant Field Values
      • PLAYBACK_VOLUME_VARIABLE

        public static final int PLAYBACK_VOLUME_VARIABLE
        Playback information indicating the playback volume is variable and can be controlled from this object.
        See Also:
        Constant Field Values
    • Method Detail

      • getName

        public CharSequence getName()
        Returns:
        The user-friendly name of a media route. This is the string presented to users who may select this as the active route.
      • getName

        public CharSequence getName(Context context)
        Return the properly localized/resource selected name of this route.
        Parameters:
        context - Context used to resolve the correct configuration to load
        Returns:
        The user-friendly name of the media route. This is the string presented to users who may select this as the active route.
      • getStatus

        public CharSequence getStatus()
        Returns:
        The user-friendly status for a media route. This may include a description of the currently playing media, if available.
      • getStatusCode

        public int getStatusCode()
      • getSupportedTypes

        public int getSupportedTypes()
        Returns:
        A media type flag set describing which types this route supports.
      • getIconDrawable

        public Drawable getIconDrawable()
        Get the icon representing this route. This icon will be used in picker UIs if available.
        Returns:
        the icon representing this route or null if no icon is available
      • setTag

        public void setTag(Object tag)
        Set an application-specific tag object for this route. The application may use this to store arbitrary data associated with the route for internal tracking.

        Note that the lifespan of a route may be well past the lifespan of an Activity or other Context; take care that objects you store here will not keep more data in memory alive than you intend.

        Parameters:
        tag - Arbitrary, app-specific data for this route to hold for later use
      • getTag

        public Object getTag()
        Returns:
        The tag object previously set by the application
        See Also:
        setTag(Object)
      • getVolume

        public int getVolume()
        Return the current volume for this route. Depending on the route, this may only be valid if the route is currently selected.
        Returns:
        the volume at which the playback associated with this route is performed
        See Also:
        MediaRouter.UserRouteInfo.setVolume(int)
      • requestSetVolume

        public void requestSetVolume(int volume)
        Request a volume change for this route.
        Parameters:
        volume - value between 0 and getVolumeMax
      • requestUpdateVolume

        public void requestUpdateVolume(int direction)
        Request an incremental volume update for this route.
        Parameters:
        direction - Delta to apply to the current volume
      • getPresentationDisplay

        public Display getPresentationDisplay()
        Gets the Display that should be used by the application to show a Presentation on an external display when this route is selected. Depending on the route, this may only be valid if the route is currently selected.

        The preferred presentation display may change independently of the route being selected or unselected. For example, the presentation display of the default system route may change when an external HDMI display is connected or disconnected even though the route itself has not changed.

        This method may return null if there is no external display associated with the route or if the display is not ready to show UI yet.

        The application should listen for changes to the presentation display using the MediaRouter.Callback.onRoutePresentationDisplayChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo) callback and show or dismiss its Presentation accordingly when the display becomes available or is removed.

        This method only makes sense for live video routes.

        Returns:
        The preferred presentation display to use when this route is selected or null if none.
        See Also:
        MediaRouter.ROUTE_TYPE_LIVE_VIDEO, Presentation
      • isEnabled

        public boolean isEnabled()
        Returns:
        true if this route is enabled and may be selected
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 159 / 158697668. Delta: 0.02980 с