本文整理汇总了Java中com.connectsdk.service.command.ServiceSubscription类的典型用法代码示例。如果您正苦于以下问题:Java ServiceSubscription类的具体用法?Java ServiceSubscription怎么用?Java ServiceSubscription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceSubscription类属于com.connectsdk.service.command包,在下文中一共展示了ServiceSubscription类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: webAppLauncher_subscribeIsWebAppPinned
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@CommandMethod
public ServiceSubscription<?> webAppLauncher_subscribeIsWebAppPinned(final JSCommand command, JSONObject args) throws JSONException {
String webAppId = args.getString("webAppId");
return device.getWebAppLauncher().subscribeIsWebAppPinned(webAppId, new WebAppSession.WebAppPinStatusListener() {
@Override
public void onSuccess(Boolean object) {
command.success(object);
}
@Override
public void onError(ServiceCommandError error) {
command.error(error);
}
});
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:18,代码来源:JSCommandDispatcher.java
示例2: subscribePlayState
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<PlayStateListener> subscribePlayState(
final PlayStateListener listener) {
if (mPlayStateSubscription == null)
mPlayStateSubscription = new URLServiceSubscription<MediaControl.PlayStateListener>(
null, null, null, null);
if (!connected) {
connect(new ResponseListener<Object>() {
@Override
public void onError(ServiceCommandError error) {
Util.postError(listener, error);
}
@Override
public void onSuccess(Object response) {
}
});
}
if (!mPlayStateSubscription.getListeners().contains(listener))
mPlayStateSubscription.addListener(listener);
return mPlayStateSubscription;
}
开发者ID:PTCE,项目名称:popcorn-android,代码行数:27,代码来源:WebOSWebAppSession.java
示例3: subscribeMediaInfo
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<MediaInfoListener> subscribeMediaInfo(
MediaInfoListener listener) {
URLServiceSubscription<MediaInfoListener> request = new URLServiceSubscription<MediaInfoListener>(this, "info", null, null);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:10,代码来源:CastService.java
示例4: subscribeMute
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<MuteListener> subscribeMute(MuteListener listener) {
URLServiceSubscription<MuteListener> request = new URLServiceSubscription<MuteListener>(this, CAST_SERVICE_MUTE_SUBSCRIPTION_NAME, null, null);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:9,代码来源:CastService.java
示例5: subscribePlayState
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<PlayStateListener> subscribePlayState(PlayStateListener listener) {
URLServiceSubscription<PlayStateListener> request = new URLServiceSubscription<PlayStateListener>(this, PLAY_STATE, null, null);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:9,代码来源:CastService.java
示例6: subscribePlayState
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<PlayStateListener> subscribePlayState(PlayStateListener listener) {
URLServiceSubscription<PlayStateListener> request = new URLServiceSubscription<MediaControl.PlayStateListener>(this, PLAY_STATE, null, null);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:DLNAService.java
示例7: subscribeVolume
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<VolumeListener> subscribeVolume(VolumeListener listener) {
URLServiceSubscription<VolumeListener> request = new URLServiceSubscription<VolumeListener>(this, "volume", null, null);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:DLNAService.java
示例8: subscribeMute
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<MuteListener> subscribeMute(MuteListener listener) {
URLServiceSubscription<MuteListener> request = new URLServiceSubscription<MuteListener>(this, "mute", null, null);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:DLNAService.java
示例9: subscribeRunningApp
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<AppInfoListener> subscribeRunningApp(AppInfoListener listener) {
// Do nothing - Not Supported
Util.postError(listener, ServiceCommandError.notSupported());
return new NotSupportedServiceSubscription<AppInfoListener>();
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:NetcastTVService.java
示例10: subscribeCurrentChannel
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<ChannelListener> subscribeCurrentChannel(final ChannelListener listener) {
getCurrentChannel(listener); // This is for the initial Current TV Channel Info.
URLServiceSubscription<ChannelListener> request = new URLServiceSubscription<ChannelListener>(this, "ChannelChanged", null, null);
request.setHttpMethod(ServiceCommand.TYPE_GET);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:12,代码来源:NetcastTVService.java
示例11: subscribeProgramInfo
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<ProgramInfoListener> subscribeProgramInfo(ProgramInfoListener listener) {
// Do nothing - Not Supported
Util.postError(listener, ServiceCommandError.notSupported());
return null;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:NetcastTVService.java
示例12: subscribeProgramList
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<ProgramListListener> subscribeProgramList(ProgramListListener listener) {
// Do nothing - Not Supported
Util.postError(listener, ServiceCommandError.notSupported());
return null;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:NetcastTVService.java
示例13: subscribe3DEnabled
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<State3DModeListener> subscribe3DEnabled(final State3DModeListener listener) {
get3DEnabled(listener);
URLServiceSubscription<State3DModeListener> request = new URLServiceSubscription<State3DModeListener>(this, TARGET_3D_MODE, null, null);
request.setHttpMethod(ServiceCommand.TYPE_GET);
request.addListener(listener);
addSubscription(request);
return request;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:13,代码来源:NetcastTVService.java
示例14: subscribeVolume
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<VolumeListener> subscribeVolume(VolumeListener listener) {
if (getDLNAService() != null) {
return getDLNAService().subscribeVolume(listener);
}
else
Util.postError(listener, ServiceCommandError.notSupported());
return null;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:11,代码来源:NetcastTVService.java
示例15: subscribeRunningApp
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<AppInfoListener> subscribeRunningApp(
AppInfoListener listener) {
Util.postError(listener, ServiceCommandError.notSupported());
return new NotSupportedServiceSubscription<AppInfoListener>();
}
开发者ID:PTCE,项目名称:popcorn-android,代码行数:8,代码来源:RokuService.java
示例16: subscribePlayState
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<PlayStateListener> subscribePlayState(PlayStateListener listener) {
if (getDLNAService() != null) {
return getDLNAService().subscribePlayState(listener);
}
else Util.postError(listener, ServiceCommandError.notSupported());
return null;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:10,代码来源:NetcastTVService.java
示例17: subscribeIsWebAppPinned
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<WebAppPinStatusListener> subscribeIsWebAppPinned(
String webAppId, WebAppPinStatusListener listener) {
mWebAppPinnedSubscription = service.getWebAppLauncher().subscribeIsWebAppPinned(webAppId,
listener);
return mWebAppPinnedSubscription;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:WebOSWebAppSession.java
示例18: subscribeWebAppStatus
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
/**
* Subscribes to changes in the web app's status.
*
* @param listener
* (optional) MessageListener to be called on app status change
*/
public ServiceSubscription<MessageListener> subscribeWebAppStatus(
MessageListener listener) {
if (listener != null)
listener.onError(ServiceCommandError.notSupported());
return null;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:14,代码来源:WebAppSession.java
示例19: subscribePlayState
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<PlayStateListener> subscribePlayState(
PlayStateListener listener) {
MediaControl mediaControl = null;
if (service != null)
mediaControl = service.getAPI(MediaControl.class);
if (mediaControl != null)
return mediaControl.subscribePlayState(listener);
else if (listener != null)
listener.onError(ServiceCommandError.notSupported());
return null;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:16,代码来源:WebAppSession.java
示例20: subscribeAppState
import com.connectsdk.service.command.ServiceSubscription; //导入依赖的package包/类
@Override
public ServiceSubscription<AppStateListener> subscribeAppState(
LaunchSession launchSession,
com.connectsdk.service.capability.Launcher.AppStateListener listener) {
// TODO Auto-generated method stub
return null;
}
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:8,代码来源:DIALService.java
注:本文中的com.connectsdk.service.command.ServiceSubscription类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论