0

Google 드라이브에 이미지를 저장하고 Google App Engine 서버 (Python)에 웹 링크를 공유하는 Android 앱이 있습니다.프로그래밍 방식으로 안드로이드에서 Google 드라이브 링크를 공유하는 방법은 무엇입니까?

// Create client 
    mGoogleApiClient = new GoogleApiClient.Builder(mContext) 
     .addApi(Drive.API) 
     .addScope(Drive.SCOPE_FILE) 
     .addConnectionCallbacks(this) 
     .addOnConnectionFailedListener(this) 
     .build(); 

    // handling results after uploading 
    final DriveOperationResult<Metadata> driveOperationResultHandler = new DriveOperationResult<Metadata>() { 

    @Override 
    public void onDriveOperationSucceeded(Metadata result) { 
     try { 
      // Successfully fetched metadata 
      onSuccess(driveId, 
         result.getOriginalFilename(), 
         result.getWebContentLink(), 
         result.getWebViewLink(), 
         result.getAlternateLink(), 
         result.getEmbedLink()); 
     } finally { 
      mGoogleDriveClient.disconnectAsync(); 
     } 
    } 

참고 : result.getEmbedLink()는 항상 null를 돌려줍니다. 또한 result.getAlternateLink() 및 result.getWebContentLink()는 사용자가 로그인 한 경우 액세스 할 수 없습니다. 내가 프로그래밍, 즉 안드로이드에서 파일을 공유하는 모든 사람이 볼 수 있도록 어떻게

+0

먼저 getEmbedLink()를 설정하고 getEmbedLink()를 시도한 적이 있습니까? – Dziugas

+0

시도해보십시오 [SO 스레드] (http://stackoverflow.com/questions/15202163/get-shared-link-through-google-drive-api). 추가적인 통찰력을 제공 할 수 있습니다. – noogui

답변

0

(사용자를 가정하고 그와 OK입니다) 그것은 구글 드라이브의 안드로이드 API와 수 없습니다.