1
votes


I've been playing with the new "Google Drive Android API". My app is currently using "setIndexableText()", "setDescription()" to add data for custom file indexing and "fullText contains ..." to get the files back (see the snippet below). But I'm not able to find equivalent functionality in the new API. So, the question is:

  1. am I embarrassing myself again by not seeing it?
  2. is the functionality it coming?
  3. is there a workaround?
  4. should I stay with my old implementation (I'd hate it if there are such goodies out there)

UP to Drive:

  File body = new File();
  body.setTitle(FILE_NAME);
  body.setDescription("one two three");        
  body.setIndexableText(new IndexableText().setText("aaa bb ccc"));
  body.setMimeType("image/jpeg");
  body.setModifiedDate(DateTime.parseRfc3339(yyyy_mm));
  body.setParents(Arrays.asList(new ParentReference().setId(FOLDER_ID)));
  FileContent cont = new FileContent("image/jpeg",new java.io.File(FILE_NAME));
  mDrvSvc.files().insert(body, cont).setUseContentAsIndexableText(false).setOcr(false).execute();

DOWN from Drive:

  FileList lst = mDrvSvc.files().list().setMaxResults(MAX_DOWN).setQ(
  "mimeType = 'image/jpeg' and fullText contains 'aaa' and ..."
  ).execute();

ThanksaLotUpFront, sean

1

1 Answers

1
votes

Indexable text is not a currently supported metadata in the new Android API, sorry about that. Google should likely add it as the metadata will be expanded in the coming releases.