app/src/main/java/com/sample/MovEmt/activity/EnterStopActivity.java
@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);


        switch (requestCode) {
            case REQUEST_CODE: {
                File currentPhoto = new File(currentPhotoPath);
                if (currentPhoto.length() > 0) {
                    LoadingDialogFragment loadingDialog = new LoadingDialogFragment();
                    loadingDialog.show(getSupportFragmentManager(), "LoadingDialogFragment");

                    ComputerVisionClient compVisClient = ComputerVisionManager.authenticate(getString(R.string.azure_subscription_key)).withEndpoint(getString(R.string.azure_endpoint));
                    recognizeTextOCRLocal(compVisClient, loadingDialog, currentPhoto);
                }
                else if (currentPhoto.exists()) {
                    currentPhoto.delete();
                }
                break;
            }
        }
    }
// Handle the result of capturing the photo
Handle the result of capturing the photo
Handle the result of capturing the photo
@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        switch (requestCode) {
            case REQUEST_CODE: {
                File currentPhoto = new File(currentPhotoPath);
                if (currentPhoto.length() > 0) {
                    LoadingDialogFragment loadingDialog = new LoadingDialogFragment();
                    loadingDialog.show(getSupportFragmentManager(), "LoadingDialogFragment");
                    ComputerVisionClient compVisClient = ComputerVisionManager.authenticate(getString(R.string.azure_subscription_key)).withEndpoint(getString(R.string.azure_endpoint));
                    recognizeTextOCRLocal(compVisClient, loadingDialog, currentPhoto);
                }
                else if (currentPhoto.exists()) {
                    currentPhoto.delete();
                }
                break;
            }
        }
    }
@ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { super . onActivityResult ( requestCode , resultCode , data ) ; switch ( requestCode ) { case REQUEST_CODE : { File currentPhoto = new File ( currentPhotoPath ) ; if ( currentPhoto . length ( ) > 0 ) { LoadingDialogFragment loadingDialog = new LoadingDialogFragment ( ) ; loadingDialog . show ( getSupportFragmentManager ( ) , "LoadingDialogFragment" ) ; ComputerVisionClient compVisClient = ComputerVisionManager . authenticate ( getString ( R . string . azure_subscription_key ) ) . withEndpoint ( getString ( R . string . azure_endpoint ) ) ; recognizeTextOCRLocal ( compVisClient , loadingDialog , currentPhoto ) ; } else if ( currentPhoto . exists ( ) ) { currentPhoto . delete ( ) ; } break ; } } }
Handle the result of capturing the photo
Handle the result of capturing the photo