public class

ReconnectionService

extends Service
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ com.google.android.gms.cast.framework.ReconnectionService

Class Overview

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 setEnableReconnectionService(boolean). When enabled, this service will be started only when there is an ongoing cast session.

Summary

[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Public Constructors
ReconnectionService()
Public Methods
IBinder onBind(Intent intent)
void onCreate()
void onDestroy()
int onStartCommand(Intent intent, int flags, int startId)
[Expand]
Inherited Methods
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks2
From interface android.content.ComponentCallbacks

Public Constructors

public ReconnectionService ()

Public Methods

public IBinder onBind (Intent intent)

Parameters
intent Intent
Returns
IBinder

public void onCreate ()

public void onDestroy ()

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

Parameters
intent Intent
flags int
startId int
Returns
int