So, in the end, I'm trying to upload the images that I want to Google OCR. Then I want the OCR results back to my Android application. I have uploaded my images correctly. I can iterate over all the files on my Google drive, and I see that there are available export links, one of which is text / plain. If I use one of these URLs in a browser, it loads the text. So should I try to access it?
I tried using the url that I get from calling the getExportLinks method in the file returned by the insert method
File file = drive.files().insert(body, mediaContent).setOcr(true).execute(); String imageAsTextUrl = getExportLinks.get("text/plain")
I get the HTML back, which appears to be the main page of Google Drive. In order to get the exported url document, I used an instance of the Google drive, so it must be authenticated correctly, as the insertion method I would think.
DriveRequest request = new DriveRequest(drive, HttpMethod.GET, imageAsTextUrl, null);
Has anyone tried to do this before? What am I doing wrong?
source share