com.google.android.gms.cast.LaunchOptions Java Examples

The following examples show how to use com.google.android.gms.cast.LaunchOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CreateRouteRequest.java    From 365browser with Apache License 2.0 5 votes vote down vote up
private PendingResult<Cast.ApplicationConnectionResult> launchApplication(
        GoogleApiClient apiClient,
        String appId,
        boolean relaunchIfRunning) {
    LaunchOptions.Builder builder = new LaunchOptions.Builder();
    return Cast.CastApi.launchApplication(apiClient, appId,
            builder.setRelaunchIfRunning(relaunchIfRunning)
                    .build());
}
 
Example #2
Source File: CastDeviceControllerImpl.java    From android_packages_apps_GmsCore with Apache License 2.0 5 votes vote down vote up
@Override
public void launchApplication(String applicationId, LaunchOptions launchOptions) {
    Application app = null;
    try {
        app = this.chromecast.launchApp(applicationId);
    } catch (IOException e) {
        Log.w(TAG, "Error launching cast application: " + e.getMessage());
        this.onApplicationConnectionFailure(CommonStatusCodes.NETWORK_ERROR);
        return;
    }
    this.sessionId = app.sessionId;

    ApplicationMetadata metadata = this.createMetadataFromApplication(app);
    this.onApplicationConnectionSuccess(metadata, app.statusText, app.sessionId, true);
}
 
Example #3
Source File: CastApiImpl.java    From android_external_GmsLib with Apache License 2.0 4 votes vote down vote up
@Override
public PendingResult<Cast.ApplicationConnectionResult> launchApplication(GoogleApiClient client, String applicationId, LaunchOptions launchOptions) {
    return null;
}
 
Example #4
Source File: CastDeviceControllerImpl.java    From android_packages_apps_GmsCore with Apache License 2.0 4 votes vote down vote up
@Override
public void joinApplication(String applicationId, String sessionId, JoinOptions joinOptions) {
    Log.d(TAG, "unimplemented Method: joinApplication");
    this.launchApplication(applicationId, new LaunchOptions());
}