Created
September 16, 2020 08:30
-
-
Save tolunayozturk/b9fd3191e977d374e3194839bf26418e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void queryReply() { | |
new Thread(new Runnable() { | |
@Override | |
public void run() { | |
try { | |
if (mAccessToken == null) { | |
Log.d(TAG, "need to sign in first"); | |
return; | |
} | |
if (fileSearched == null) { | |
Log.d(TAG, "query file first"); | |
return; | |
} | |
if (mComment == null) { | |
Log.d(TAG, "comment the file first"); | |
return; | |
} | |
Drive drive = buildDrive(); | |
ReplyList response = drive.replies() | |
.list(fileSearched.getId(), mComment.getId()) | |
.setFields("replies(id,description)") | |
.execute(); | |
final String text = response.getReplies().toString(); | |
MainActivity.this.runOnUiThread(new Runnable() { | |
@Override | |
public void run() { | |
tv_replies.setText(text); | |
} | |
}); | |
} catch (Exception e) { | |
Log.d(TAG, "query reply failed" + e.toString()); | |
} | |
} | |
}).start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment