AI-generated Key Takeaways
-
PrecacheManager is the entry point for pre-cache APIs and can be obtained using CastContext.getPrecacheManager().
-
The
precachemethod allows developers to pre-cache content to reduce loading time during playback. -
Implementing an
onPrecache()method on the receiver side is necessary when using theprecacheAPI.
The entry point of pre-cache APIs. Developers can get the instance of this class by
calling
CastContext.getPrecacheManager().
Public Method Summary
| void |
Inherited Method Summary
Public Methods
public void precache (String data)
Pre-caches the content that users intend to consume in order to reduce the loading time at playback. If using this API, devlopers must implement their own precache logic on the receiver side by implementing an onPrecache() method.
For how to handle the data received in the receiver app, see //developers.google.com/cast/docs/reference/receiver/cast.receiver.MediaManager#onPrecache
Parameters
| data | A String that will be sent to the receiver app to specify which
content should be pre-cached. |
|---|