With Dynamsoft Camera SDK Android Edition, you can easily implement the built-in video view in your app. The built-in video view has the capability of real-time document detection, auto cropping the detected documents, capturing images, etc.
How to enable document detection in a video stream
By default, the document detection function is turned on.
If you just want to take photos, you can disable it by calling setMode() to DME_IMAGE.
As you can see, there are built-in icons for capturing images or documents, controlling flash and camera position. The capture function is built into the capture icon, so you don't even need to call capture methods captureImage() or captureDocument().
How to set Next View
The default view after clicking the capture button is the video view, but you can set the property nextViewAfterCapture to the image gallery view or edit view.
dcsView.getVideoView().setNextViewAfterCapture(DcsView.DVE_IMAGEGALLERYVIEW); //Set next view to DVE_IMAGEGALLERYVIEW after the Capture icon is clicked. dcsView.getVideoView().setNextViewAfterCancel(DcsView.DVE_IMAGEGALLERYVIEW); //Set next view to DVE_IMAGEGALLERYVIEW after the Cancel icon is clicked.
You can also customize the built-in icons on the video view, such as, hiding the flash tool item, or changing the text shown on it, etc. Check related functions here.