Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

MediaTransferReceiver

class MediaTransferReceiver : BroadcastReceiver
kotlin.Any
   ↳ android.content.BroadcastReceiver
   ↳ androidx.mediarouter.media.MediaTransferReceiver

A BroadcastReceiver class for enabling Media transfer feature.

Media transfer is a feature that media routing can be controlled via system UI. By using this, media app users can re-route the media without opening the app activity again. Also, the media can be transferred from one device to another device seamlessly, depending on the devices. This feature is supported from Android 11.

To enable the media transfer feature, media apps should declare this receiver in the app's manifest. For example:

<code>&lt;application&gt;
      &lt;receiver android:name="androidx.mediarouter.media.MediaTransferReceiver" /&gt;
  &lt;/application&gt;
  </code>

Media apps that enable this feature should implement the MediaRouter.Callback properly. Specifically:

Summary

Public constructors

A BroadcastReceiver class for enabling Media transfer feature.

Public methods
Unit
onReceive(@NonNull context: Context, @NonNull intent: Intent)

Public constructors

<init>

MediaTransferReceiver()

A BroadcastReceiver class for enabling Media transfer feature.

Media transfer is a feature that media routing can be controlled via system UI. By using this, media app users can re-route the media without opening the app activity again. Also, the media can be transferred from one device to another device seamlessly, depending on the devices. This feature is supported from Android 11.

To enable the media transfer feature, media apps should declare this receiver in the app's manifest. For example:

<code>&lt;application&gt;
      &lt;receiver android:name="androidx.mediarouter.media.MediaTransferReceiver" /&gt;
  &lt;/application&gt;
  </code>

Media apps that enable this feature should implement the MediaRouter.Callback properly. Specifically:

Public methods

onReceive

fun onReceive(
    @NonNull context: Context,
    @NonNull intent: Intent
): Unit