public class Service extends Object
Search
, or by getByURI(Uri, Result)
and
getById(Context, String, Result)
, if the service url or id
are known and specified, respectively.Modifier and Type | Field and Description |
---|---|
static String |
SUPPORT_DMP |
static String |
TYPE_SMART_TV |
static String |
TYPE_SPEAKER |
Modifier and Type | Method and Description |
---|---|
Application |
createApplication(String id,
String channelId)
Create an application with the given app and channel id.
|
Application |
createApplication(String id,
String channelId,
Map<String,Object> startArgs)
Create an application with the given app and channel id.
|
Application |
createApplication(Uri uri,
String channelId)
Create an application with the given uri and channel id.
|
Application |
createApplication(Uri uri,
String channelId,
Map<String,Object> startArgs)
Create an application with the given uri and channel id.
|
AudioPlayer |
createAudioPlayer(String appName)
Create an Audio Player with the service id
|
Channel |
createChannel(Uri uri)
Create a channel with the given uri.
|
PhotoPlayer |
createPhotoPlayer(String appName)
Create an Photo Player with the service id
|
VideoPlayer |
createVideoPlayer(String appName)
Create an Video Player with the service id
|
boolean |
equals(Object o) |
static void |
getById(Context context,
String id,
Result<Service> result)
Retrieve the service given by the specified id.
|
static void |
getByURI(Uri uri,
int timeout,
Result<Service> result)
Retrieve the service given by the specified uri.
|
static void |
getByURI(Uri uri,
Result<Service> result)
Retrieve the service given by the specified uri.
|
void |
getDeviceInfo(Result<Device> callback)
Retrieve the underlying device information for the specified service.
|
String |
getId()
Returns the id for this service.
|
com.samsung.multiscreen.Service.SecureModeState |
getIsSecureModeSupported()
Returns whether secure mode is supported by service.
|
Boolean |
getIsStandbyService()
Returns if this service is a service for standby device or not.
|
Map<String,Object> |
getIsSupport()
Returns the support features for this service.
|
String |
getName()
Returns the name for this service.
|
String |
getType()
Returns the type for this service.
|
Uri |
getUri()
Returns the endpoint uri for this service.
|
String |
getVersion()
Returns the version for this service.
|
int |
hashCode() |
void |
isDMPSupported(Result<Boolean> result)
Checks whether support for DMP feature is provided or not
|
void |
remove()
Removes standby device service from standby device list.
|
static Search |
search(Context context)
Get an instance of
Search for service discovery. |
void |
setIsSecureModeSupported(com.samsung.multiscreen.Service.SecureModeState isSecureModeSupported)
Returns whether secure mode is supported by service.
|
String |
toString() |
static void |
WakeOnWirelessAndConnect(String macAddr,
Uri uri,
int timeout,
Result<Service> connectCallback)
Send a packet via WakeOnWirelessLan and create and connect to particular appilcation
|
static void |
WakeOnWirelessAndConnect(String macAddr,
Uri uri,
Result<Service> connectCallback)
Send a packet via WakeOnWirelessLan and create and connect to particular appilcation
|
static void |
WakeOnWirelessLan(String macAddr)
Send a packet for WakeOnWirelessLan.
|
public static final String SUPPORT_DMP
public static final String TYPE_SMART_TV
public static final String TYPE_SPEAKER
public static Search search(Context context)
Search
for service discovery.context
- the context for the searchSearch
instancepublic static void getByURI(Uri uri, Result<Service> result)
uri
- the uri of the serviceresult
- the callback to invoke, if the service is retrieved.public static void getByURI(Uri uri, int timeout, Result<Service> result)
uri
- the uri of the servicetimeout
- the timeout in millisecondsresult
- the callback to invoke, if the service is retrieved.public static void getById(Context context, String id, Result<Service> result)
context
- the context for executionid
- the id for the service to retrieveresult
- the callback to invoke, if the service is retrievedpublic static void WakeOnWirelessLan(String macAddr)
macAddr
- Mac Address of TVpublic static void WakeOnWirelessAndConnect(String macAddr, Uri uri, Result<Service> connectCallback)
macAddr
- Mac Address of TVuri
- the uri of serviceconnectCallback
- the callback to invoke with the result of the connect requestpublic static void WakeOnWirelessAndConnect(String macAddr, Uri uri, int timeout, Result<Service> connectCallback)
macAddr
- Mac Address of TVuri
- the uri of servicetimeout
- the timeout for service connect requestconnectCallback
- the callback to invoke with the result of the connect requestpublic void getDeviceInfo(Result<Device> callback)
callback
- the callback to invoke, if the device info is retrievedpublic Channel createChannel(Uri uri)
uri
- the uri for the channelpublic Application createApplication(Uri uri, String channelId)
uri
- the uri for the applicationchannelId
- the id to use for the channelpublic Application createApplication(Uri uri, String channelId, Map<String,Object> startArgs)
uri
- the uri for the applicationchannelId
- the id to use for the channelstartArgs
- arguments to pass to the application on startpublic Application createApplication(String id, String channelId)
id
- the id for the applicationchannelId
- the id to user for the channelpublic VideoPlayer createVideoPlayer(String appName)
appName
- Name of the applicationpublic PhotoPlayer createPhotoPlayer(String appName)
appName
- Name of the applicationpublic AudioPlayer createAudioPlayer(String appName)
appName
- Name of the applicationpublic Application createApplication(String id, String channelId, Map<String,Object> startArgs)
id
- the id for the applicationchannelId
- the id to use for the channelstartArgs
- arguments to pass to the application on startpublic void remove()
public void isDMPSupported(Result<Boolean> result)
result
- : result to return whether DMP is supported by this service or notpublic com.samsung.multiscreen.Service.SecureModeState getIsSecureModeSupported()
public String getId()
public String getVersion()
public String getName()
public String getType()
public Map<String,Object> getIsSupport()
public Uri getUri()
public Boolean getIsStandbyService()
public void setIsSecureModeSupported(com.samsung.multiscreen.Service.SecureModeState isSecureModeSupported)