PrecacheManager | Doclava
public class

PrecacheManager

extends Object
java.lang.Object
   ↳ com.google.android.gms.cast.framework.PrecacheManager

Class Overview

The entry point of pre-cache APIs. Developers can get the instance of this class by calling getPrecacheManager().

Summary

Public Methods
void precache(String data)
Pre-caches the content that users intend to consume in order to reduce the loading time.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void precache (String data)

Pre-caches the content that users intend to consume in order to reduce the loading time. When this method is called, the data to be cached will be sent to the connected receiver, if there is one. If there is no connected receiver, the data to be cached will be broadcast to all receivers on the same network as the sender device is on. Note that this is a best-effort delievery, meaning that the data is not guaranteed to be delivered to the receivers. It is the developer's responsibility to decide when to call the method and what data should be sent. We recommend using this method only when necessary.

For how to handle the data received in the receiver app, please see https://developers.google.com/cast/docs/reference/receiver/cast.receiver.MediaManager#onPrecache

Parameters
data String:A String that will be sent to the receiver app to specify which content should be pre-cached.