googleworkspace / android-samples

Android samples for Google Workspace APIs
Apache License 2.0
635 stars 410 forks source link

Programm crashes with unknow issue with google play service #29

Closed tvrhossain closed 9 years ago

tvrhossain commented 9 years ago

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.

seanpjanson commented 9 years ago

Both EXISTING_FOLDER_ID and EXISTING_FILE_ID are 'ResourceID's of objects your app has created (FILE scope limits visibility of other Drive files / folders) That means you first have to create these objects. Please refer to this SO: http://stackoverflow.com/questions/29030110/cannot-get-folderid-that-i-just-created-on-google-drive to get some understanding of DriveId vs ResourceId.

To wrap it up: 1/ create file / folder using this DEMO 2/ extract ResourceId from DriveId you get 3/ paste the resource id string to the constant you're reffering to.

ResourceId may not be immediately available, since GooPlaySvcs must commit the file / folder before it can give it to you. see: http://stackoverflow.com/questions/22874657/unpredictable-result-of-driveid-getresourceid-in-google-drive-android-api

In general, go to Stack Overflow 'google-drive-android-api] tag http://stackoverflow.com/questions/tagged/google-drive-android-api to get answers.