本文整理汇总了Java中com.connectsdk.service.command.ServiceSubscription类的典型用法代码示例。如果您正苦于以下问题:Java ServiceSubscription类的具体用法?Java ServiceSubscription怎么用?Java ServiceSubscription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceSubscription类属于com.connectsdk.service.command包,在下文中一共展示了ServiceSubscription类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
});
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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>();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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>();
}