• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WebAppLauncher类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.connectsdk.service.capability.WebAppLauncher的典型用法代码示例。如果您正苦于以下问题:Java WebAppLauncher类的具体用法?Java WebAppLauncher怎么用?Java WebAppLauncher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WebAppLauncher类属于com.connectsdk.service.capability包,在下文中一共展示了WebAppLauncher类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getPriorityLevel

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
public CapabilityPriorityLevel getPriorityLevel(Class<? extends CapabilityMethods> clazz) {
    if (clazz.equals(MediaPlayer.class)) {
        return getMediaPlayerCapabilityLevel();
    }
    else if (clazz.equals(MediaControl.class)) {
        return getMediaControlCapabilityLevel();
    }
    else if (clazz.equals(VolumeControl.class)) {
        return getVolumeControlCapabilityLevel();
    }
    else if (clazz.equals(WebAppLauncher.class)) {
        return getWebAppLauncherCapabilityLevel();
    }
    return CapabilityPriorityLevel.NOT_SUPPORTED;
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:17,代码来源:CastService.java


示例2: onCreate

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_fullscreen);
	
	mLaunchButton = (Button) findViewById(R.id.launchButton);
	mLaunchButton.setOnClickListener(mLaunchClickListener);
	
	mCloseButton = (Button) findViewById(R.id.closeButton);
	mCloseButton.setOnClickListener(mCloseClickListener);
	
	mSendButton = (Button) findViewById(R.id.sendButton);
	mSendButton.setOnClickListener(sendClickListener);
	
	mMessageText = (EditText) findViewById(R.id.messageText);
	mStatusTextView = (TextView) findViewById(R.id.statusTextView);
	
	DiscoveryManager.init(getApplicationContext());
	
	CapabilityFilter webAppFilter = new CapabilityFilter(WebAppLauncher.Launch, WebAppLauncher.Close, WebAppLauncher.Message_Send);
	
	DiscoveryManager.getInstance().setCapabilityFilters(webAppFilter);
	DiscoveryManager.getInstance().start();
	
	mDevicePicker = new DevicePicker(this);
}
 
开发者ID:ConnectSDK,项目名称:Web-App-Sampler-Android,代码行数:27,代码来源:FullscreenActivity.java


示例3: onClick

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
public void onClick(View v) {
    if (mWebAppSession != null) {
        mWebAppSession.setWebAppSessionListener(null);
        mWebAppSession.disconnectFromWebApp();
        mWebAppSession = null;

        launchWebAppButton.setEnabled(true);
        joinWebAppButton.setEnabled(getTv().hasCapability(WebAppLauncher.Join));
        sendMessageButton.setEnabled(false);
        sendJSONButton.setEnabled(false);
        leaveWebAppButton.setEnabled(false);
        closeWebAppButton.setEnabled(false);
        isLaunched = false;
    }
}
 
开发者ID:ConnectSDK,项目名称:Connect-SDK-Android-API-Sampler,代码行数:17,代码来源:WebAppFragment.java


示例4: onWebAppSessionDisconnect

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
public void onWebAppSessionDisconnect(WebAppSession webAppSession) {
    Log.d("LG", "Device was disconnected");

    if (webAppSession != mWebAppSession) {
        webAppSession.setWebAppSessionListener(null);
        return;
    }

    launchWebAppButton.setEnabled(true);
    if (getTv() != null) joinWebAppButton.setEnabled(getTv().hasCapability(WebAppLauncher.Join));
    sendMessageButton.setEnabled(false);
    sendJSONButton.setEnabled(false);
    leaveWebAppButton.setEnabled(false);
    closeWebAppButton.setEnabled(false);

    mWebAppSession.setWebAppSessionListener(null);
    mWebAppSession = null;
    isLaunched = false;
}
 
开发者ID:ConnectSDK,项目名称:Connect-SDK-Android-API-Sampler,代码行数:21,代码来源:WebAppFragment.java


示例5: onSuccess

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
public void onSuccess(Object response) {
    if (getTv() == null)
        return;

    if (getTv().hasCapability(WebAppLauncher.Message_Send_JSON))
        sendJSONButton.setEnabled(true);

    if (getTv().hasCapability(WebAppLauncher.Message_Send))
        sendMessageButton.setEnabled(true);

    leaveWebAppButton.setEnabled(getTv().hasCapability(WebAppLauncher.Disconnect));

    closeWebAppButton.setEnabled(true);
    launchWebAppButton.setEnabled(false);
    isLaunched = true;
}
 
开发者ID:ConnectSDK,项目名称:Connect-SDK-Android-API-Sampler,代码行数:18,代码来源:WebAppFragment.java


示例6: updateCapabilities

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
protected void updateCapabilities() {
    List<String> capabilities = new ArrayList<String>();

    Collections.addAll(capabilities, MediaPlayer.Capabilities);
    capabilities.add(Subtitle_WebVTT);


    Collections.addAll(capabilities, VolumeControl.Capabilities);

    capabilities.add(Play);
    capabilities.add(Pause);
    capabilities.add(Stop);
    capabilities.add(Duration);
    capabilities.add(Seek);
    capabilities.add(Position);
    capabilities.add(PlayState);
    capabilities.add(PlayState_Subscribe);

    capabilities.add(WebAppLauncher.Launch);
    capabilities.add(Message_Send);
    capabilities.add(Message_Receive);
    capabilities.add(Message_Send_JSON);
    capabilities.add(Message_Receive_JSON);
    capabilities.add(WebAppLauncher.Connect);
    capabilities.add(WebAppLauncher.Disconnect);
    capabilities.add(WebAppLauncher.Join);
    capabilities.add(WebAppLauncher.Close);

    setCapabilities(capabilities);
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:32,代码来源:CastService.java


示例7: closeLaunchSession

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
/**
 * Closes the session on the first screen device. Depending on the sessionType, the associated service will have different ways of handling the close functionality.
 *
 * @param launchSession LaunchSession to close
 * @param listener (optional) listener to be called on success/failure
 */
public void closeLaunchSession(LaunchSession launchSession, ResponseListener<Object> listener) {
    if (launchSession == null) {
        Util.postError(listener, new ServiceCommandError(0, "You must provide a valid LaunchSession", null));
        return;
    }

    DeviceService service = launchSession.getService();
    if (service == null) {
        Util.postError(listener, new ServiceCommandError(0, "There is no service attached to this launch session", null));
        return;
    }

    switch (launchSession.getSessionType()) {
    case App:
        if (service instanceof Launcher)
            ((Launcher) service).closeApp(launchSession, listener);
        break;
    case Media:
        if (service instanceof MediaPlayer)
            ((MediaPlayer) service).closeMedia(launchSession, listener);
        break;
    case ExternalInputPicker:
        if (service instanceof ExternalInputControl)
            ((ExternalInputControl) service).closeInputPicker(launchSession, listener);
        break;
    case WebApp:
        if (service instanceof WebAppLauncher)
            ((WebAppLauncher) service).closeWebApp(launchSession, listener);
        break;
    case Unknown:
    default:
        Util.postError(listener, new ServiceCommandError(0, "This DeviceService does not know ho to close this LaunchSession", null));
        break;
    }
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:42,代码来源:DeviceService.java


示例8: webAppLauncher_launchWebApp

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@CommandMethod
public void webAppLauncher_launchWebApp(JSCommand command, JSONObject args) throws JSONException {
    String webAppId = args.getString("webAppId");
    JSONObject params = args.optJSONObject("params");

    if (params != null && device.hasCapability(WebAppLauncher.Launch_Params))
        device.getWebAppLauncher().launchWebApp(webAppId, params, command.getWebAppLaunchListener());
    else
        device.getWebAppLauncher().launchWebApp(webAppId, command.getWebAppLaunchListener());
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:11,代码来源:JSCommandDispatcher.java


示例9: updateCapabilities

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
protected void updateCapabilities() {
    List<String> capabilities = new ArrayList<String>();

    Collections.addAll(capabilities, MediaPlayer.Capabilities);
    Collections.addAll(capabilities, VolumeControl.Capabilities);

    capabilities.add(Play);
    capabilities.add(Pause);
    capabilities.add(Stop);
    capabilities.add(Duration);
    capabilities.add(Seek);
    capabilities.add(Position);
    capabilities.add(PlayState);
    capabilities.add(Subtitles_Vtt);
    capabilities.add(PlayState_Subscribe);

    capabilities.add(WebAppLauncher.Launch);
    capabilities.add(Message_Send);
    capabilities.add(Message_Receive);
    capabilities.add(Message_Send_JSON);
    capabilities.add(Message_Receive_JSON);
    capabilities.add(WebAppLauncher.Connect);
    capabilities.add(WebAppLauncher.Disconnect);
    capabilities.add(WebAppLauncher.Join);
    capabilities.add(WebAppLauncher.Close);

    setCapabilities(capabilities);
}
 
开发者ID:PTCE,项目名称:popcorn-android,代码行数:30,代码来源:CastService.java


示例10: testGetPriorityLevel

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Test
public void testGetPriorityLevel() {
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.HIGH,
            service.getPriorityLevel(MediaPlayer.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(ExternalInputControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(KeyControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(Launcher.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.HIGH,
            service.getPriorityLevel(MediaControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(MouseControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(PlaylistControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(PowerControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(TextInputControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(ToastControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(TVControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(VolumeControl.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(WebAppLauncher.class));
    Assert.assertEquals(CapabilityMethods.CapabilityPriorityLevel.NOT_SUPPORTED,
            service.getPriorityLevel(null));
}
 
开发者ID:ConnectSDK,项目名称:Connect-SDK-Android-FireTV,代码行数:32,代码来源:FireTVServiceTest.java


示例11: setTv

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
public void setTv(ConnectableDevice tv)
{
    mTv = tv;

    if (tv == null) {
        launcher = null;
        mediaPlayer = null;
        mediaControl = null;
        tvControl = null;
        volumeControl = null;
        toastControl = null;
        textInputControl = null;
        mouseControl = null;
        externalInputControl = null;
        powerControl = null;
        keyControl = null;
        webAppLauncher = null;

        disableButtons();
    }
    else {
        launcher = mTv.getCapability(Launcher.class);
        mediaPlayer = mTv.getCapability(MediaPlayer.class);
        mediaControl = mTv.getCapability(MediaControl.class);
        tvControl = mTv.getCapability(TVControl.class);
        volumeControl = mTv.getCapability(VolumeControl.class);
        toastControl = mTv.getCapability(ToastControl.class);
        textInputControl = mTv.getCapability(TextInputControl.class);
        mouseControl = mTv.getCapability(MouseControl.class);
        externalInputControl = mTv.getCapability(ExternalInputControl.class);
        powerControl = mTv.getCapability(PowerControl.class);
        keyControl = mTv.getCapability(KeyControl.class);
        webAppLauncher = mTv.getCapability(WebAppLauncher.class);

        enableButtons();
    }
}
 
开发者ID:ConnectSDK,项目名称:Connect-SDK-Android-API-Sampler,代码行数:38,代码来源:BaseFragment.java


示例12: getWebAppLauncher

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
public WebAppLauncher getWebAppLauncher() {
    return this;
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:5,代码来源:CastService.java


示例13: testGetCapabilities

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Test
public void testGetCapabilities() {
    Set<String> expectedCapabilities = new HashSet<String>(Arrays.asList(
            MediaPlayer.Display_Image,
            MediaPlayer.Play_Video,
            MediaPlayer.Play_Audio,
            MediaPlayer.Close,
            MediaPlayer.MetaData_Title,
            MediaPlayer.MetaData_Description,
            MediaPlayer.MetaData_Thumbnail,
            MediaPlayer.MetaData_MimeType,
            MediaPlayer.MediaInfo_Get,
            MediaPlayer.MediaInfo_Subscribe,

            VolumeControl.Volume_Get,
            VolumeControl.Volume_Set,
            VolumeControl.Volume_Up_Down,
            VolumeControl.Volume_Subscribe,
            VolumeControl.Mute_Get,
            VolumeControl.Mute_Set,
            VolumeControl.Mute_Subscribe,

            MediaControl.Play,
            MediaControl.Pause,
            MediaControl.Stop,
            MediaControl.Duration,
            MediaControl.Seek,
            MediaControl.Position,
            MediaControl.PlayState,
            MediaPlayer.Subtitle_WebVTT,
            MediaControl.PlayState_Subscribe,

            WebAppLauncher.Launch,
            WebAppLauncher.Message_Send,
            WebAppLauncher.Message_Receive,
            WebAppLauncher.Message_Send_JSON,
            WebAppLauncher.Message_Receive_JSON,
            WebAppLauncher.Connect,
            WebAppLauncher.Disconnect,
            WebAppLauncher.Join,
            WebAppLauncher.Close
    ));
    Set<String> capabilities = new HashSet<String>(service.getCapabilities());
    Assert.assertEquals(expectedCapabilities, capabilities);
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:46,代码来源:CastServiceTest.java


示例14: getPriorityLevel

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
public CapabilityPriorityLevel getPriorityLevel(Class<? extends CapabilityMethods> clazz) {
    if (clazz.equals(MediaPlayer.class)) {
        return getMediaPlayerCapabilityLevel();
    }
    else if (clazz.equals(MediaControl.class)) {
        return getMediaControlCapabilityLevel();
    }
    else if (clazz.equals(Launcher.class)) {
        return getLauncherCapabilityLevel();
    }
    else if (clazz.equals(TVControl.class)) {
        return getTVControlCapabilityLevel();
    }
    else if (clazz.equals(VolumeControl.class)) {
        return getVolumeControlCapabilityLevel();
    }
    else if (clazz.equals(ExternalInputControl.class)) {
        return getExternalInputControlPriorityLevel();
    }
    else if (clazz.equals(MouseControl.class)) {
        return getMouseControlCapabilityLevel();
    }
    else if (clazz.equals(TextInputControl.class)) {
        return getTextInputControlCapabilityLevel();
    }
    else if (clazz.equals(PowerControl.class)) {
        return getPowerControlCapabilityLevel();
    }
    else if (clazz.equals(KeyControl.class)) {
        return getKeyControlCapabilityLevel();
    }
    else if (clazz.equals(ToastControl.class)) {
        return getToastControlCapabilityLevel();
    }
    else if (clazz.equals(WebAppLauncher.class)) {
        return getWebAppLauncherCapabilityLevel();
    }
    else if (clazz.equals(PlaylistControl.class)) {
        return getPlaylistControlCapabilityLevel();
    }
    return CapabilityPriorityLevel.NOT_SUPPORTED;
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:44,代码来源:WebOSTVService.java


示例15: getWebAppLauncher

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
/**************
Web App Launcher
 **************/

@Override
public WebAppLauncher getWebAppLauncher() {
    return this;
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:9,代码来源:WebOSTVService.java


示例16: updateCapabilities

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
protected void updateCapabilities() {
    List<String> capabilities = new ArrayList<String>();

    Collections.addAll(capabilities, VolumeControl.Capabilities);
    Collections.addAll(capabilities, MediaPlayer.Capabilities);

    if (DiscoveryManager.getInstance().getPairingLevel() == PairingLevel.ON) {
        Collections.addAll(capabilities, TextInputControl.Capabilities);
        Collections.addAll(capabilities, MouseControl.Capabilities);
        Collections.addAll(capabilities, KeyControl.Capabilities);
        Collections.addAll(capabilities, MediaPlayer.Capabilities);
        Collections.addAll(capabilities, Launcher.Capabilities);
        Collections.addAll(capabilities, TVControl.Capabilities);
        Collections.addAll(capabilities, ExternalInputControl.Capabilities);
        Collections.addAll(capabilities, ToastControl.Capabilities);
        capabilities.add(PowerControl.Off);
    } else {
        capabilities.add(Application);
        capabilities.add(Application_Params);
        capabilities.add(Application_Close);
        capabilities.add(Browser);
        capabilities.add(Browser_Params);
        capabilities.add(Hulu);
        capabilities.add(Netflix);
        capabilities.add(Netflix_Params);
        capabilities.add(YouTube);
        capabilities.add(YouTube_Params);
        capabilities.add(AppStore);
        capabilities.add(AppStore_Params);
        capabilities.add(AppState);
        capabilities.add(AppState_Subscribe);
    }

    if (serviceDescription != null) {
        if (serviceDescription.getVersion() != null
                && (serviceDescription.getVersion().contains("4.0.0")
                || serviceDescription.getVersion().contains("4.0.1"))) {
            capabilities.add(Launch);
            capabilities.add(Launch_Params);

            capabilities.add(Play);
            capabilities.add(Pause);
            capabilities.add(Stop);
            capabilities.add(Seek);
            capabilities.add(Position);
            capabilities.add(Duration);
            capabilities.add(PlayState);

            capabilities.add(WebAppLauncher.Close);

            if (getDLNAService() != null) {
                capabilities.add(MediaPlayer.Subtitle_SRT);
            }
        } else {
            Collections.addAll(capabilities, WebAppLauncher.Capabilities);
            Collections.addAll(capabilities, MediaControl.Capabilities);

            capabilities.add(MediaPlayer.Subtitle_WebVTT);

            capabilities.add(PlaylistControl.JumpToTrack);
            capabilities.add(PlaylistControl.Next);
            capabilities.add(PlaylistControl.Previous);

            capabilities.add(MediaPlayer.Loop);
        }

    }

    setCapabilities(capabilities);
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:72,代码来源:WebOSTVService.java


示例17: updateCapabilities

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
protected void updateCapabilities() {
    List<String> capabilities = new ArrayList<String>();

    if (DiscoveryManager.getInstance().getPairingLevel() == PairingLevel.ON) {
        Collections.addAll(capabilities, TextInputControl.Capabilities);
        Collections.addAll(capabilities, MouseControl.Capabilities);
        Collections.addAll(capabilities, KeyControl.Capabilities);
        Collections.addAll(capabilities, MediaPlayer.Capabilities);
        Collections.addAll(capabilities, Launcher.Capabilities);
        Collections.addAll(capabilities, TVControl.Capabilities);
        Collections.addAll(capabilities, ExternalInputControl.Capabilities);
        Collections.addAll(capabilities, VolumeControl.Capabilities);
        Collections.addAll(capabilities, ToastControl.Capabilities);

        capabilities.add(PowerControl.Off);
    } else {
        Collections.addAll(capabilities, VolumeControl.Capabilities);
        Collections.addAll(capabilities, MediaPlayer.Capabilities);

        capabilities.add(Application);
        capabilities.add(Application_Params);
        capabilities.add(Application_Close);
        capabilities.add(Browser);
        capabilities.add(Browser_Params);
        capabilities.add(Hulu);
        capabilities.add(Netflix);
        capabilities.add(Netflix_Params);
        capabilities.add(YouTube);
        capabilities.add(YouTube_Params);
        capabilities.add(AppStore);
        capabilities.add(AppStore_Params);
        capabilities.add(AppState);
        capabilities.add(AppState_Subscribe);
    }

    if (serviceDescription != null && serviceDescription.getVersion() != null) {
        if (serviceDescription.getVersion().contains("4.0.0") || serviceDescription.getVersion().contains("4.0.1")) {
            capabilities.add(Launch);
            capabilities.add(Launch_Params);

            capabilities.add(Play);
            capabilities.add(Pause);
            capabilities.add(Stop);
            capabilities.add(Seek);
            capabilities.add(Position);
            capabilities.add(Duration);
            capabilities.add(PlayState);

            capabilities.add(WebAppLauncher.Close);
        } else {
            Collections.addAll(capabilities, WebAppLauncher.Capabilities);
            Collections.addAll(capabilities, MediaControl.Capabilities);

            capabilities.add(PlaylistControl.JumpToTrack);
            capabilities.add(PlaylistControl.Next);
            capabilities.add(PlaylistControl.Previous);

            capabilities.add(MediaPlayer.Loop);
        }
    }

    setCapabilities(capabilities);
}
 
开发者ID:PTCE,项目名称:popcorn-android,代码行数:65,代码来源:WebOSTVService.java


示例18: enableButtons

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
@Override
public void enableButtons() {
    super.enableButtons();

    if (getTv().hasCapability(WebAppLauncher.Launch)) {
        launchWebAppButton.setOnClickListener(launchWebApp);
    }
    else {
        disableButton(launchWebAppButton);
    }

    joinWebAppButton.setEnabled(getTv().hasCapability(WebAppLauncher.Launch));
    joinWebAppButton.setOnClickListener(joinWebApp);

    leaveWebAppButton.setEnabled(getTv().hasCapability(WebAppLauncher.Disconnect));
    leaveWebAppButton.setOnClickListener(leaveWebApp);

    if (getTv().hasCapability(WebAppLauncher.Close)) {
        closeWebAppButton.setOnClickListener(closeWebApp);
    }

    if (getTv().hasCapability(WebAppLauncher.Message_Send)) {
        sendMessageButton.setOnClickListener(sendMessage);
        sendJSONButton.setOnClickListener(sendJson);
    }

    if (getTv().hasCapability(WebAppLauncher.Pin)) {
        pinWebAppButton.setOnClickListener(pinWebApp);
        unPinWebAppButton.setOnClickListener(unPinWebApp);
    }

    responseMessageTextView.setText("");

    if (!isLaunched) {
        disableButton(closeWebAppButton);
        disableButton(leaveWebAppButton);
        disableButton(sendMessageButton);
        disableButton(sendJSONButton);
    }
    else {
        disableButton(launchWebAppButton);
    }

    if (getTv().getServiceByName(WEBOSID) != null)
        webAppId = "WebAppTester";
    else if (getTv().getServiceByName(CASTID) != null)
        webAppId = "DDCEDE96";
    else if (getTv().getServiceByName(MULTISCREENID) != null)
        webAppId = "ConnectSDKSampler";


    if (getTv().hasCapability(WebAppLauncher.Pin)) {
        subscribeIfWebAppIsPinned();
    }
    else {
        disableButton(pinWebAppButton);
        disableButton(unPinWebAppButton);
    }
}
 
开发者ID:ConnectSDK,项目名称:Connect-SDK-Android-API-Sampler,代码行数:60,代码来源:WebAppFragment.java


示例19: getWebAppLauncher

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
public WebAppLauncher getWebAppLauncher() 
{
    return webAppLauncher;
}
 
开发者ID:ConnectSDK,项目名称:Connect-SDK-Android-API-Sampler,代码行数:5,代码来源:BaseFragment.java


示例20: getWebAppLauncher

import com.connectsdk.service.capability.WebAppLauncher; //导入依赖的package包/类
/**
 * Accessor for highest priority WebAppLauncher object
 * This method is deprecated. Use
 * `ConnectableDevice#getCapability(Class<T> controllerClass)` method instead
 */
@Deprecated
public WebAppLauncher getWebAppLauncher() {
    return getCapability(WebAppLauncher.class);
}
 
开发者ID:david-fenton,项目名称:Connect-SDK-Cordova-Plugin,代码行数:10,代码来源:ConnectableDevice.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CatalogException类代码示例发布时间:2022-05-22
下一篇:
Java MUCAdmin类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap