2
Google+ 로그인과 함께 Google Play 서비스를 사용하고 있기 때문에 앱을 시작할 때 연결해야하지만 Cast API를 사용하려면 연결하기 전에 CastDevice
을 선택해야합니다. Google Play 서비스를 시작할 수 있지만 앱을 시작할 때 가능하지 않습니다. 여러 Google Play 서비스 API와 Cast API를 연결하는 방법
이
는 사용자가 여기에 연결할 수 없습니다 캐스팅 장치를 선택해야하지만 활동이 인증을 시작할 때 연결해야하는 경우 내가 현재@Override
protected void onCreate(Bundle savedInstanceState) {
....
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(Plus.API)
.addApi(Drive.API)
.addApi(Cast.API,apiOptionsBuilder.build()) //not possible to be ready yet at this point
.addScope(Plus.SCOPE_PLUS_LOGIN)
.addScope(Drive.SCOPE_FILE)
.build();
....
}
을 설정하는 방법이다
어떻게 다른 API도 필요할 때 Cast API를 사용하여 처리합니까? GoogleApiClient 인스턴스가 2 개 필요합니까?
다른 API를 이전에 연결해야하는 경우 다른 인스턴스를 사용할 수 있습니다. –