當前位置: 首頁>>代碼示例>>Java>>正文


Java CastWebAppSession類代碼示例

本文整理匯總了Java中com.connectsdk.service.sessions.CastWebAppSession的典型用法代碼示例。如果您正苦於以下問題:Java CastWebAppSession類的具體用法?Java CastWebAppSession怎麽用?Java CastWebAppSession使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CastWebAppSession類屬於com.connectsdk.service.sessions包,在下文中一共展示了CastWebAppSession類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: CastService

import com.connectsdk.service.sessions.CastWebAppSession; //導入依賴的package包/類
public CastService(ServiceDescription serviceDescription, ServiceConfig serviceConfig) {
    super(serviceDescription, serviceConfig);

    mCastClient = new CastClient();
    mCastClientListener = new CastListener();
    mConnectionCallbacks = new ConnectionCallbacks();
    mConnectionFailedListener = new ConnectionFailedListener();

    sessions = new HashMap<String, CastWebAppSession>();
    subscriptions = new ArrayList<URLServiceSubscription<?>>();

    mWaitingForReconnect = false;
}
 
開發者ID:david-fenton,項目名稱:Connect-SDK-Cordova-Plugin,代碼行數:14,代碼來源:CastService.java

示例2: onResult

import com.connectsdk.service.sessions.CastWebAppSession; //導入依賴的package包/類
@Override
public void onResult(ApplicationConnectionResult result) {
    Status status = result.getStatus();

    if (status.isSuccess()) {
        ApplicationMetadata applicationMetadata = result.getApplicationMetadata();
        currentAppId = applicationMetadata.getApplicationId();

        LaunchSession launchSession = LaunchSession.launchSessionForAppId(applicationMetadata.getApplicationId());
        launchSession.setAppName(applicationMetadata.getName());
        launchSession.setSessionId(result.getSessionId());
        launchSession.setSessionType(LaunchSessionType.WebApp);
        launchSession.setService(CastService.this);

        CastWebAppSession webAppSession = new CastWebAppSession(launchSession, CastService.this);
        webAppSession.setMetadata(applicationMetadata);

        sessions.put(applicationMetadata.getApplicationId(), webAppSession);

        if (listener != null) {
            listener.onSuccess(webAppSession);
        }

        launchingAppId = null;
    }
    else {
        if (listener != null) {
            listener.onFailure(new ServiceCommandError(status.getStatusCode(), status.getStatusMessage(), status));
        }
    }
}
 
開發者ID:david-fenton,項目名稱:Connect-SDK-Cordova-Plugin,代碼行數:32,代碼來源:CastService.java

示例3: CastService

import com.connectsdk.service.sessions.CastWebAppSession; //導入依賴的package包/類
public CastService(ServiceDescription serviceDescription, ServiceConfig serviceConfig) {
    super(serviceDescription, serviceConfig);

    mCastClientListener = new CastListener();
    mConnectionCallbacks = new ConnectionCallbacks();
    mConnectionFailedListener = new ConnectionFailedListener();

    sessions = new HashMap<String, CastWebAppSession>();
    subscriptions = new ArrayList<URLServiceSubscription<?>>();

    mWaitingForReconnect = false;
}
 
開發者ID:PTCE,項目名稱:popcorn-android,代碼行數:13,代碼來源:CastService.java

示例4: onApplicationDisconnected

import com.connectsdk.service.sessions.CastWebAppSession; //導入依賴的package包/類
@Override
public void onApplicationDisconnected(int statusCode) {
    Log.d(Util.T, "Cast.Listener.onApplicationDisconnected: " + statusCode);

    if (currentAppId == null)
        return;

    CastWebAppSession webAppSession = sessions.get(currentAppId);

    if (webAppSession == null)
        return;

    webAppSession.handleAppClose();

    currentAppId = null;
}
 
開發者ID:david-fenton,項目名稱:Connect-SDK-Cordova-Plugin,代碼行數:17,代碼來源:CastService.java

示例5: CastServiceChannel

import com.connectsdk.service.sessions.CastWebAppSession; //導入依賴的package包/類
public CastServiceChannel(String webAppId, @NonNull CastWebAppSession session) {
    this.webAppId = webAppId;
    this.session = session;
}
 
開發者ID:david-fenton,項目名稱:Connect-SDK-Cordova-Plugin,代碼行數:5,代碼來源:CastServiceChannel.java

示例6: setUp

import com.connectsdk.service.sessions.CastWebAppSession; //導入依賴的package包/類
@Before
public void setUp() {
    session = Mockito.mock(CastWebAppSession.class);
    channel = new CastServiceChannel("id", session);
}
 
開發者ID:david-fenton,項目名稱:Connect-SDK-Cordova-Plugin,代碼行數:6,代碼來源:CastServiceChannelTest.java

示例7: CastServiceChannel

import com.connectsdk.service.sessions.CastWebAppSession; //導入依賴的package包/類
public CastServiceChannel(String webAppId, CastWebAppSession session) {
    this.webAppId = webAppId;
    this.session = session;
}
 
開發者ID:PTCE,項目名稱:popcorn-android,代碼行數:5,代碼來源:CastServiceChannel.java


注:本文中的com.connectsdk.service.sessions.CastWebAppSession類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。