You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want when I launch the document scanner to go directly into the Manual Mode and if possible hide the Auto Capture button. I tried setting the mode to CAPTURE_MODE_MANUAL, but it is not working.
Below is my code to reproduce the bug
fun startScanner(activity: Activity?, pageLimit: Int = 10) {
if (activity == null) {
Timber.i("Unable to launch scanner: activity is null.")
return
}
val options = buildScannerOptions(pageLimit)
val scanner = GmsDocumentScanning.getClient(options)
scanner.getStartScanIntent(activity)
.addOnSuccessListener { intent ->
val request = IntentSenderRequest.Builder(intent).build()
launcher.launch(request)
}
.addOnFailureListener { exception ->
showToast(activity, exception.localizedMessage)
}
}
private fun buildScannerOptions(pageLimit: Int): GmsDocumentScannerOptions {
return GmsDocumentScannerOptions.Builder()
.setGalleryImportAllowed(true)
.setResultFormats(
GmsDocumentScannerOptions.RESULT_FORMAT_PDF,
GmsDocumentScannerOptions.RESULT_FORMAT_JPEG
)
.setPageLimit(pageLimit)
.setScannerMode(GmsDocumentScannerOptions.CAPTURE_MODE_MANUAL)
.build()
}
Expected behavior
The Auto Capture button should be hidden or at least not the default mode but the manual mode.
Is it also possible to disable the auto cropping when I take a photo in manual mode? We would like to have a use case that does not require document scanning, but can still take pictures and use the gallery and use the MLkIt filters. @mebjas
Thanks for the request. Currently there is no client API to configure this. Manual vs Auto only control automatic capture. Please file another FR for this and we'd triage it separately based on priority of other items team is working on.
I want when I launch the document scanner to go directly into the Manual Mode and if possible hide the Auto Capture button. I tried setting the mode to CAPTURE_MODE_MANUAL, but it is not working.
Below is my code to reproduce the bug
Expected behavior
The Auto Capture button should be hidden or at least not the default mode but the manual mode.
SDK Info:
Smartphone:
Development Environment:
Android Studio Jellyfish
The text was updated successfully, but these errors were encountered: