Search code examples
androidandroid-studiogoogle-drive-apiocrscanning

How can I use Google Drive API to scan a document in an Android Studio app?


I'm trying to build a simple Android Studio app that can read text from images: the idea is to use the camera to take a picture of a single document page and then do some OCR.
I've already tried to use my OCR on documents that I scanned manually with the Google Drive app and the result is satisfying, but when I try with raw pictures from the camera, it doesn't work anymore.
1) Is there a way to use Google Drive API (or similar) to obtain a good quality scan from the camera without reinventing the wheel?
2) Also, is there a way to do the whole process from the camera to the final text with known tools?
Any help would be really appreciated!


Solution

  • You Can use an Intent in your app to use the camera and resources from the google drive, it's like a link that drives the user to an other app that makes the hard work, like camera resources or google drive or even the google lens. You Can search more and find the solution for your specific problem in those links. https://github.com/zxing/zxing/wiki/Scanning-Via-Intent https://developer.android.com/reference/android/hardware/camera2/package-summary