当前位置: 首页>>代码示例>>Java>>正文


Java ServiceSubscription类代码示例

本文整理汇总了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);
        }
    });
}
 
开发者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


注:本文中的com.connectsdk.service.command.ServiceSubscription类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。