public class ReconnectionService extends Service

A service to run in the background when the playback of a media starts, to help with reconnection if needed. Due to various reasons, connectivity to the cast device can be lost; for example wifi radio may turn off when device goes to sleep or user may step outside of the wifi range, etc. This service helps with recovering the connectivity when circumstances are right, for example when user steps back within the wifi range, etc. In order to avoid ending up with a background service that lingers around longer than it is needed, this implementation uses certain heuristics to stop itself when needed. Using of this service is enabled by default. It can be disabled via CastOptions.Builder.setEnableReconnectionService(boolean). When enabled, this service will be started only when there is an ongoing cast session.

Inherited Constant Summary

Public Constructor Summary

Public Method Summary

onBind(Intent intent)
onStartCommand(Intent intent, int flags, int startId)

Inherited Method Summary

Public Constructors

public ReconnectionService ()

Public Methods

public IBinder onBind (Intent intent)

public void onCreate ()

public void onDestroy ()

public int onStartCommand (Intent intent, int flags, int startId)