0
파일을 생성하는 Android 앱을 개발 중이며 Google 드라이브에 이러한 파일을 업로드해야하지만 특정 계정 만 사용해야합니다. 이것을 할 수있는 방법이 있습니까? 지금은안드로이드 앱이 특정 계정 만 사용하여 Google 드라이브 API (GDAA)를 사용하도록하려면 어떻게해야합니까?
I가이 나를 계정을 선택할 수 있습니다 코드 : 따라서
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
}
@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
if (connectionResult.hasResolution()) {
try {
connectionResult.startResolutionForResult(this, RESOLVE_CONNECTION_REQUEST_CODE);
} catch (IntentSender.SendIntentException e) {
// Unable to resolve, message user appropriately
}
} else {
GooglePlayServicesUtil.getErrorDialog(connectionResult.getErrorCode(), this, 0).show();
}
}
감사
답변 해 주셔서 감사합니다. 나는 당신이 제안한 대안을 점검 할 것이다. – Gringo
나는 firebase 기능을보고 있었고 필요한 것이 아닙니다. 모든 사용자가 중앙 저장소에 파일을 업로드해야하고 관리자 (PC)가 모든 사용자에게 업로드 된 모든 파일을 볼 수 있다는 것을 잊어 버렸습니다. – Gringo