googleworkspace / android-samples Goto Github PK
View Code? Open in Web Editor NEWAndroid samples for Google Workspace APIs
License: Apache License 2.0
Android samples for Google Workspace APIs
License: Apache License 2.0
After I press ANY ITEM in the list my program crashes saying, "unknown issue with google play service " and I get an ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null}. The only thing I found is that the resource id for BaseDemoActivity.EXISTING_FOLDER_ID and BaseDemoActivity.EXISTING_FILE_ID is not set for my resources, I dont know how to get them from google drive and what they are.
when i open pickfolder picker and create new folder using that and then select that new folder, it throws nullpointerexception on driveid.
Hi,
Thanks for the demo. It is really helpful.
I'm facing an issue with, MetadataBuffer or metadata. It doesn't contain the latest values. For example, the metadata.getModifiedDate().getTime(); is having an older value, however the file contains the latest data. This becomes a problem when i try to resolve any conflict. Also, when i create a file on different device, it doesn't show here (Tried enabling Auto Sync, requestSync, clearing GPS cache, everything).
i want to store resource id of dynamically created folder in google drive using API for creating file inside it. how can i get that? i already tried below code but it always returns null.
Log.e("UPLO", "RES ID: " + folder.getDriveId().getResourceId());
i also tried waiting for 5 seconds and then fetch resourceID from stored driveid of folder but still getting null.
In my case, I have to use REST API too since Android SDK does not cover everything. In order to use REST API, token is a must.
So my question is: is there a way to get token in the demo?
how can i get list of folders of drive.?
I think the code below is missing a "!" in the if statement.
if (result.getMetadata().isPinnable()) {
showMessage("File is not pinnable");
return;
}
In iOS sdk we have method for this: https://developers.google.com/drive/ios/devguide/files
Some files in Google Drive are not directly downloadable. Google Docs, Sheets, and Slides must be converted into a portable format. These files can be downloaded using the export URL. For example, to export a document as a PDF:
NSString *url = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@/export?alt=media&mimeType=application/pdf",
file.identifier]
It is my belief, that using 'new Thread() {....).start() in the 'CreateEmptyFileActivity' class is not necessary, since no part of the enclosed code is blocking.
Is it possible to get connected client user info, like username, email, when using Google Client Api for access and adding Drive API only? Or, have to use some other api like G+ or Sign-In?
This is what's written on the repo's page:
If you actually want to run this sample app (though it is mostly provided so you can read the code), you will need to register an OAuth 2.0 client for the package com.google.android.gms.drive.sample.demo with your own debug keys and set any resource IDs to those that you have access to. Resource ID definitions are on:
com.google.android.gms.drive.sample.demo.BaseDemoActivity.EXISTING_FOLDER_ID
com.google.android.gms.drive.sample.demo.BaseDemoActivity.EXISTING_FILE_ID
What I don't understand:
hi i have imported this demo with latest google play service library 21 but i am getting some errors in some classes like
The method newDriveContents(GoogleApiClient) is undefined for the type DriveApi
DriveContents cannot be resolved to a type
DriveContentsResult cannot be resolved to a type
please any one guide me is there any updated demo with latest google play service library 21 ?
Hi all,
When i running the demo, one issue appeared:
I choose my Google Account: [email protected] to access Google Drive, but failed. Here is the log message:
I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{419fdaa8: android.os.BinderProxy@419cad20}, message=null}
Is there something wrong or i missed something? Could you please share your advice here? TIA
Thanks Muran
Hello.
I'm Natali.
I am implementing interaction with google drive for user.
My main goal is to get file link which I can send to other api (my api) to analyse file text.
I use this documents https://developers.google.com/drive/android/intro
And this demos. of cause https://github.com/googledrive/android-demos
At first I read file content and send text to my api as body of request.
Use this example https://github.com/googledrive/android-demos/blob/master/app/src/main/java/com/google/android/gms/drive/sample/demo/RetrieveContentsActivity.java
But I have problems with russian text and files with extensions not .txt (.docx as an example).
So can you help in this question? What way is right?
Can I get public link to file? How should I download file content in correct way?
Thanks.
I imported the app to Android studio and executed in my mobile. But I am getting "Error signing into specified account" when I try to do any operation. But there is no issue with my credentials, can you please help me to solve this issue?.
I must say that your examples are so good and easy to understand for a beginners. But can you tell how we can upload files to drive from our device like phone.
I am trying to import the project in Eclipse but as soon i import it there are so many errors in the code even after adding google play services library. Has anyone else faced the same situation?
Hello,
In this demo projects there is use of Drive SDK which imports com.google.android.gms.drive.MetadataChangeSet but in new api there is no imnport of MetadataChangeSet so can you plese tell me how i solve this problem and make this demo working.
final private ResultCallback<DriveApi.DriveContentsResult> driveContentsCallback = new
ResultCallback<DriveApi.DriveContentsResult>() {
@OverRide
public void onResult(DriveApi.DriveContentsResult result) {
if (!result.getStatus().isSuccess()) {
showMessage("Error while trying to create new file contents");
return;
}
final DriveContents driveContents = result.getDriveContents();
// Perform I/O off the UI thread.
new Thread() {
@Override
public void run() {
// write content to DriveContents
int a;
String sdcard = Environment.getExternalStorageDirectory().getPath();
File myFile = new File(sdcard+"/payment.pdf");
try {
FileInputStream fin;
BufferedReader br;
fin=new FileInputStream(myFile);
br = new BufferedReader(
new InputStreamReader(fin));
OutputStream outputStream = driveContents.getOutputStream();
ByteArrayOutputStream byt = new ByteArrayOutputStream();
Writer writer = new OutputStreamWriter(outputStream);
while((a=br.read())!=-1)
{
byt.write(a);
}
outputStream.write(byt.toByteArray());
} catch (IOException e) {
e.printStackTrace();
}
MetadataChangeSet changeSet = new MetadataChangeSet.Builder()
.setTitle("New file pdf2")
.setMimeType("application/pdf")
.setStarred(true).build();
// create a file on root folder
Drive.DriveApi.getRootFolder(getGoogleApiClient())
.createFile(getGoogleApiClient(), changeSet, driveContents)
.setResultCallback(fileCallback);
}
}.start();
}
};
i am creating one folder using drive API from one device. now i am trying to create file inside that folder using other device but i cant create it. i am getting invalid parent folder error. please help me with this major issue.
If i uninstall my app and the reinstall it, when i'm trying to query a file(sqlite db) from app folder its return null metadata but if i re-run my application from android studio everything works great. Whats wrong here?
I have opened an issue, question about the createFromResourceId() method here: http://stackoverflow.com/questions/21800257/where-did-the-createfromresourceid-go
I believe it has some relevance to the code here.
1/ am not sure about this, but I noticed when using getMetadataBuffer() in my implementation, it creates a memory leak without using 'close()' on the buffer. I was searching the DEMO code for the same sequence but did not find 'close()' there. Do you see memleaks there?
2/ In README.MD, I don't see a reference to RetrieveContentsWithProgressDialogActivity (mentioned in 'https://developers.google.com/drive/android/files' and present in the code set). Probably by-design and a non-issue.
Sorry, for being obnoxious, I know these are minor issues. I'm trying to point out roadblocks I run into, most of them probably caused more by my lack of knowledge/ignorance.
All examples are activity based, is it possible to post service based example too? I know I can write my own but it would be a great time saver to start with an example.
I am using Google Drive in my apps as automatic backup service where once user authorizes, app runs in the background and syncs whenever there is a new file
I am trying the demo app but not able to see the change notification when file metadata is changed on drive website.
I am listening for a file change which is created using this app.
ConnectionResult connectionResult = mGoogleApiClientBlocking.blockingConnect(WAITTM, TimeUnit.MILLISECONDS);
is always CANCELED
I have just tested with version 24 too
From @ewiebe1 on October 12, 2014 11:31
I have a link to someones else Google Drive (anybody who has the link is able to open / hear mp3 files). I have opened one of these mp3 files with the drive-music-player. After that I wanted to add all 30 (?) mp3 files. OK, that worked, but they were added slowly and in the wrong order. Now I wanted to change the order and pressed on the create-playlist-button at the bottom right. It started to do sth. (progress bar on grayed out list) but nothing happens any more.
Please make it possible to arrange the order in a fast way. Thanks.
Copied from original issue: nicolasgarnier/drive-music-player#9
In AndroidManifest.xml:
I know the readme said this project is mainly to see the code, but I would like to run the example on a device, just to get a sense of the functionality. With that in mind, I've tried running this example on a Galaxy Nexus and Nexus 5, both of which have the latest Google Play Services installed - 4.1.32 (978161-36). In building the sample project, I included the new 4.1 library from the Android SDK.
However, I'm getting this error when running the app:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.gms.drive.sample.demo/com.google.android.gms.drive.sample.demo.HomeActivity}: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4132500 but found 4130500. You must have the following declaration within the element:
What am I missing?
getNextPageToken() method had been deprecated and will always return null
https://developers.google.com/android/reference/com/google/android/gms/drive/MetadataBuffer
I have created a file in app folder on Google drive.and i am reading and modifying it using its drive id very well.but when i uninstall my and re install it and if i want to access that file with same drive id on another device, i am not able to do that.and don't face any error in log cat during that so am confused where is problem.
I got below error when i select account from account chooser dialog:
04-17 18:42:29.912: E/AndroidRuntime(20652): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=null} to activity {com.drive.testdemo/com.drive.testdemo.PickFolderWithOpenerActivity}: java.lang.NullPointerException
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.app.ActivityThread.deliverResults(ActivityThread.java:3432)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3475)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.app.ActivityThread.access$1300(ActivityThread.java:139)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.os.Handler.dispatchMessage(Handler.java:102)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.os.Looper.loop(Looper.java:136)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.app.ActivityThread.main(ActivityThread.java:5086)
04-17 18:42:29.912: E/AndroidRuntime(20652): at java.lang.reflect.Method.invokeNative(Native Method)
04-17 18:42:29.912: E/AndroidRuntime(20652): at java.lang.reflect.Method.invoke(Method.java:515)
04-17 18:42:29.912: E/AndroidRuntime(20652): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
04-17 18:42:29.912: E/AndroidRuntime(20652): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
04-17 18:42:29.912: E/AndroidRuntime(20652): at dalvik.system.NativeStart.main(Native Method)
04-17 18:42:29.912: E/AndroidRuntime(20652): Caused by: java.lang.NullPointerException
04-17 18:42:29.912: E/AndroidRuntime(20652): at com.drive.testdemo.PickFolderWithOpenerActivity.onActivityResult(PickFolderWithOpenerActivity.java:67)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.app.Activity.dispatchActivityResult(Activity.java:5446)
04-17 18:42:29.912: E/AndroidRuntime(20652): at android.app.ActivityThread.deliverResults(ActivityThread.java:3428)
Hi there!
I tried the android-demos everything seems tobe working fine except ListenChangeEventsForFilesActivity.java I have selected (txt) a file to listen for changes. Made some changes for the same file at drive.google.com (ex: Star, Rename, ACL change). None of the events showed for me in the demo activity. No luck after waiting for long time too.
Is there anything am missing here?
I tried listening for files that are created from within the app as well as created over web. No changes listed in both the cases. Related post on SO: http://stackoverflow.com/questions/22778501/android-google-drive-file-change-listener-not-working
only connect when performing a new task manually synchronize data because I've had problems but I am getting an error message when syncing "Sync request rate limit exceeded"
How do I can fix it?
@Override
public void onConnected(Bundle bundle) {
dialog.setMessage(getResources().getString(R.string.dialogBackup2));
Drive.DriveApi.requestSync(mGoogleApiClient)
.setResultCallback(new ResultCallback<Status>() {
@Override
public void onResult(Status result) {
if (!result.isSuccess()) {
// Sync not ok
showMessage(result.getStatusMessage().toString());
//showMessage(getResources().getString(R.string.errBackup1));
dialog.dismiss();
return;
}
dialog.setMessage(getResources().getString(R.string.dialogBackup3));
Query query = new Query.Builder().build();
Drive.DriveApi.query(getGoogleApiClient(), query)
.setResultCallback(compruebaFolder);
dialog.dismiss();
}
});
}
I use the latest google play services library (updated on March 17)
DriveFile class does not contain trash() method.
How can you use in (https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/TrashFileActivity.java)?
I've noticed that the AsyncTask has been extended with ApiClientAsyncTask on Feb 17,2014. There is no documentation or reason given for this extension and I can't figure out why is that necessary. Can the author of this change ('rakyll)' enlighten me on this issue?
Hi There,
I need help with importing / running this Android google drive quick start sample project in Eclipse.
https://github.com/googledrive/android-quickstart sample project
The code i downloaded was from this link below:
https://github.com/googledrive/android-demos/archive/master.zip
My problem: It does not compile.
Whether I create a ne project with the same class / package name, or After i import the project as is using the Eclipse import faclity, the project does not compile.
I get like 612 errors.
All of them looks like eclipse can not find certain class paths or something similar.
Example errors:
Description Resource Path Location Type
AndroidManifest.xml file missing! HomeActivity Unknown Android Packaging Problem _ BUT YET the file is present
Description Resource Path Location Type
ChangeEvent cannot be resolved to a type ListenChangeEventsForFilesActivity.java /HomeActivity/src/com/google/android/gms/drive/sample/demo/events line 116 Java Problem
and many more like that.
I tried cleaning the project, but not working
Can some one PLEASE PLEASE HELP?
I have created demo Application for google drive file sharing into my server. Below is my Process
Have enable google drive api in console
Have connected googleApiClient
Have fire intent for opening google drive file list
IntentSender intentSender = Drive.DriveApi
.newOpenFileActivityBuilder()
.setMimeType(new String[]{"application/pdf",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.google-apps.spreadsheet",
"application/vnd.google-apps.document",
"application/vnd.google-apps.presentation"})
startIntentSenderForResult(intentSender, REQUEST_CODE_OPENER, null, 0, 0, 0);
And onActivityResult code and downloadFile code as below
@OverRide
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
try {
if (resultCode == RESULT_OK) {
DriveId driveId = (DriveId) data.getParcelableExtra(OpenFileActivityBuilder.EXTRA_RESPONSE_DRIVE_ID);
DriveFile selectedFile = driveId.asDriveFile();
selectedFile.getMetadata(getGoogleApiClient()).setResultCallback(metadataRetrievedCallback);
}
} catch (Exception e) {
e.printStackTrace();
}
}
ResultCallback<DriveResource.MetadataResult> metadataRetrievedCallback = new
ResultCallback<DriveResource.MetadataResult>() {
@OverRide
public void onResult(DriveResource.MetadataResult result) {
if (!result.getStatus().isSuccess()) {
AppLog.e("problem", "Problem while trying to fetch metadata");
return;
}
Metadata metadata = result.getMetadata();
if (metadata.getTitle().contains(".")) {
fileName = metadata.getTitle();
} else {
if (metadata.getMimeType().contains("application/pdf"))
fileName = metadata.getTitle() + ".pdf";
else if (metadata.getMimeType().contains("application/vnd.openxmlformats-officedocument.wordprocessingml.document"))
fileName = metadata.getTitle() + ".docx";
else if (metadata.getMimeType().contains("application/vnd.google-apps.spreadsheet"))
fileName = metadata.getTitle() + ".xls";
else if (metadata.getMimeType().contains("application/vnd.google-apps.presentation"))
fileName = metadata.getTitle() + ".pptx";
else if (metadata.getMimeType().contains("application/vnd.google-apps.document"))
fileName = metadata.getTitle() + ".txt";
}
new FileDownloadTask().execute();
}
};
private class FileDownloadTask extends AsyncTask<String, Void, String> {
@Override
protected void onPreExecute() {
super.onPreExecute();
progressDialog = ProgressDialog.show(FileExplorerActivity.this, "", true, false, null);
}
@Override
protected String doInBackground(String... arg0) {
downloadFileToSdCard();
return null;
}
@Override
protected void onPostExecute(String s) {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
}
super.onPostExecute(s);
Intent intent = new Intent();
intent.putExtra("filePath", Const.DOC_PATH + "/" + fileName);
setResult(RESULT_OK, intent);
finish();
}
private void downloadFileToSdCard() {
try {
selectedFile.open(getGoogleApiClient(), DriveFile.MODE_READ_ONLY, null).setResultCallback(contentsOpenedCallback);
} catch (Exception io) {
io.printStackTrace();
}
}
}
ResultCallback<DriveApi.DriveContentsResult> contentsOpenedCallback =
new ResultCallback<DriveApi.DriveContentsResult>() {
@OverRide
public void onResult(DriveApi.DriveContentsResult result) {
if (!result.getStatus().isSuccess()) {
return;
}
try {
File dir = new File(Const.DOC_PATH);
if (dir.exists() == false) {
dir.mkdirs();
}
String fName = fileName;
File file = new File(dir, fName);
if (file.exists())
file.delete();
FileOutputStream fos = new FileOutputStream(file);
DriveContents driveContents = result.getDriveContents();
byte[] buffer = new byte[1024];
int bufferLength = 0;
InputStream inputStream = driveContents.getInputStream();
while ((bufferLength = inputStream.read(buffer)) > 0) {
fos.write(buffer, 0, bufferLength);
}
driveContents.discard(getGoogleApiClient());
fos.close();
} catch (Exception e) {
e.printStackTrace();
}
}
};
Hello. My name is Natali.
My problem is in OOM. Cropped image if larger then origin ImageView.
Can you explain how it can be?
Log.e("issue", "issue width =" + cropImageView.getWidth() + "; height =" + cropImageView.getHeight());
Bitmap croppedPhoto = cropImageView.getCroppedBitmap();
Log.e("issue", "issue croppedPhoto width =" + croppedPhoto.getWidth() + "; height =" + croppedPhoto.getHeight())
06-24 08:42:55.297 17725-17725 E/issue: issue width =720; height =1003
06-24 08:42:55.677 17725-17725 E/issue: issue croppedPhoto width =1069; height =1900
Thanks.
When i try to Export this sample in Eclipse to apk i got the error:
There should only be a single element in the manifest: merge these together
In this sample the file AndroidManifest.xml line 22-25
App runs and installs successfully on my Nexus 5 device. Android v 6.0.1. I have multiple accounts linked in the same device. As a result, when the dialog box pops up for selecting account. When the account is chosen, it recalls the same dialog box over and over again. The Android device back button doesnt work either.
Any fix?
Hello!
In https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/ListFilesInFolderActivity.java it is written:
@Override
public void onConnected(Bundle connectionHint) {
super.onCreate(connectionHint);
setContentView(R.layout.activity_listfiles);
I think it's a slip of the pen (maybe copy & paste from https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/ListFilesActivity.java). Maybe delete a line with super.onCreate?
Hi, I am only bringing the SO discussions #21369573 and #21370636 here, so we do not vent it there. I installed this DEMO package and ran a few simple tests to see. The issue I mentioned on SO is showing with this DEMO as well. Steps to reproduce:
1/ Android device: "Create a file" ... creates "New file" in the root
2/ WEB browser: https://drive.google.com ... REMOVE (TRASH, DELETE...) the "New file"
3/ Android device: "List files with pagination" the list is unchanged, "New file" is showing.
Since this DEMO does not display the files' status, I ran the same (simplified) scenario in my test suite showing the file's "trashed" status, but did not get conclusive results.
Drive.DriveApi.query(mGAC, query).addResultCallback(new OnChildrenRetrievedCallback() {
@OverRide public void onChildrenRetrieved(MetadataBufferResult rslt) {
if (!rslt.getStatus().isSuccess()) return;
MetadataBuffer mdb = rslt.getMetadataBuffer();
for (int ii = 0; ii < mdb.getCount(); ii++) {
Log.i(TAG, (mdb.get(ii).isTrashed()?"-":"+")+mdb.get(ii).getTitle());
}
mdb.close();
}
});
Originally, the deleted file was showing as (+) (not trashed)
After I EMPTIED TRASH on the web, it changed status to (-) (trashed)
But when I re-ran the same test again (delete file, empty trash), I could not reproduce the same behavior. Conclusion: The trashed status (true/false, -/+) may be just random noise.
So, the behavior I would expect (after sync):
delete file on the web: The file/folder isTrashed() should change false -> true
recover file on the web: Change true -> false
empty trash - the file should not be listed anymore
This issue isn't a showstopper for me and I assume that it is just work-in-progress and it will be corrected eventually.
And the code Burcu's asking for is 0B1mQUW2aFJfdd2JTSkVIQnBoRm8.
startIntentSenderForResult(
intentSender, REQUEST_CODE_OPENER, new Intent(), 0, 0, 0);
above method not working in fragment. it working fine in activity. help me out to solve it.
I found out I can never run the android-demos successful
I running code with last commit - 4f57857
Whenever I choose an item, says "Create a file in App Folder",
the following login dialog box will pop up
Whenever I select my account for example, the dialog will close for few seconds, and then re-appear again.
My logging message is as follow
01-09 11:36:32.783 25040-25040/? I/art: Late-enabling -Xcheck:jni
01-09 11:36:32.897 25040-25040/com.google.android.gms.drive.sample.demo W/System: ClassLoader referenced unknown path: /data/app/com.google.android.gms.drive.sample.demo-2/lib/arm
01-09 11:36:33.056 25040-25068/com.google.android.gms.drive.sample.demo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
01-09 11:36:33.118 25040-25068/com.google.android.gms.drive.sample.demo I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 10/21/15, 369a2ea, I96aee987eb
01-09 11:36:33.122 25040-25068/com.google.android.gms.drive.sample.demo I/OpenGLRenderer: Initialized EGL, version 1.4
01-09 11:36:36.898 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{d9ab090: android.os.BinderProxy@c093d89}, message=null}
01-09 11:36:36.909 25040-25046/com.google.android.gms.drive.sample.demo W/art: Suspending all threads took: 11.169ms
01-09 11:36:48.094 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{a2c01a8: android.os.BinderProxy@c093d89}, message=null}
01-09 11:36:49.664 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{860b3a7: android.os.BinderProxy@c093d89}, message=null}
01-09 11:36:51.105 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{fdcd0f2: android.os.BinderProxy@c093d89}, message=null}
01-09 11:36:52.529 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{dbf9af9: android.os.BinderProxy@c093d89}, message=null}
01-09 11:36:53.770 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{e095ec: android.os.BinderProxy@c093d89}, message=null}
01-09 11:36:55.085 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{82377bb: android.os.BinderProxy@c093d89}, message=null}
01-09 11:36:56.734 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{a542316: android.os.BinderProxy@c093d89}, message=null}
Even if I press the back button, the login dialog will disappear for few seconds, then re-appear again
01-09 11:37:30.704 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{6b2333: android.os.BinderProxy@c093d89}, message=null}
01-09 11:37:31.568 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{847eee: android.os.BinderProxy@c093d89}, message=null}
01-09 11:37:32.964 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{c1eae25: android.os.BinderProxy@c093d89}, message=null}
01-09 11:37:34.252 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{8a97408: android.os.BinderProxy@c093d89}, message=null}
01-09 11:37:34.999 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{ff11187: android.os.BinderProxy@c093d89}, message=null}
01-09 11:37:35.754 25040-25040/com.google.android.gms.drive.sample.demo I/BaseDriveActivity: GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{43fb052: android.os.BinderProxy@c093d89}, message=null}
I do have a valid Google Drive account.
My device is Nexus 5, Android version 6.0.1
May I know is this bug from code example, or something wrong with my device settings?
I compile the code using Android studio 1.5.1, with all tools and sdk up-to-date.
Hi, according to Android documentation, onStart
/onStop
are the callbacks for when Activity starts to be visible/invisible, and onResume
/onPause
are for when Activity is in foreground or not. This is especially true for Android N in split screen mode, when Activity may be paused but still visible. With that in mind, should we connect/disconnect API client during onStart
/onStop
instead of onResume
/onPause
as in BaseDemoActivity
?
Hi,
There is more items in the "titles.xml" than Activities listed in the "HomeActivity.java"...
For some activities, the tilte isn't the good one...
Regards,
Sebastien
Hi,
I imported the project using android studio and when I compile it throw me an error that import com.google.android.gms.drive.events.DriveEvent.Listener; is not recognise
This is the only issue I encounter, if I remove the usage of the Listener, the project is working fine and can launch
My build gradle is like the below
dependencies {
compile 'com.android.support:support-v4:21.0.2'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.android.support:appcompat-v7:21.0.2'
}
Try to google out, seem i the only one having the issue
If i request a query for the child of root folder it will return the some values but i also checking it's a trash bin value or not. but it's returning non trash values but i am not having anything in my drive root folder it's updating my buffer result after some hours later how can i get the current existing folders or files in the drive root folder
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.