From 75f7c4f3b283abb1f1d2e8a19a5e688b93f3dbd7 Mon Sep 17 00:00:00 2001 From: Amalkarunakaran Date: Wed, 21 Jun 2023 13:14:03 +0530 Subject: [PATCH 1/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1e96d1..701f5ef 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Based on the requirement any one or all classes can be used. And need to import //OR : can import only required classes as per use cases. import com.extrieve.quickcapture.sdk.ImgHelper; import com.extrieve.quickcapture.sdk.CameraHelper; - import com.extrieve.quickcapture.sdk.CameraSupport; + import com.extrieve.quickcapture.sdk.Config; import com.extrieve.quickcapture.sdk.ImgException; ``` --- From 5080a0af8f5317403ce23e8f8769e579adcf665d Mon Sep 17 00:00:00 2001 From: Amalkarunakaran Date: Wed, 21 Jun 2023 13:23:23 +0530 Subject: [PATCH 2/4] Update README.md --- README.md | 97 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 701f5ef..0984773 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ This class will be implemented as an activity. This class can be ini ``` ```java -Intent CameraIntent = new Intent(this,Class.forName("com.extrieve.quickcapture.sdk.CameraHelper")); UriphotoURI = Uri.parse(CameraSupport.CamConfigClass.OutputPath); +Intent CameraIntent = new Intent(this,Class.forName("com.extrieve.quickcapture.sdk.CameraHelper")); UriphotoURI = Uri.parse(Config.CaptureSupport.OutputPath); this.grantUriPermission(this.getPackageName(),photoURI,Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION); if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) { CameraIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); @@ -93,12 +93,13 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable finishActivity(REQUEST_CODE_FILE_RETURN); } ``` -Camera Helper having a supporting class with static configuration -CameraSupport.CamConfigClass.CamConfigClass : contains various configurations as follows: +SDK included a a supporting class with static configuration - which includes all configurations related to SDK. +- Confg contains a sub configuration collection **CaptureSupport** - contains all the Capture & review related configurations. +Config.CaptureSupport : contains various configurations as follows: - **OutputPath** - To set the output directory in which the captured images will be saved. Base app should have rights to write to the provided path. ```java - CameraSupport.CamConfigClass.OutputPath = “pass output path as string”; + Config.CaptureSupport.OutputPath = "pass output path sd string"; ``` - **MaxPage** - To set the number of captures to do on each camera session. And this can also control whether the capture mode is single or multi i.e > if MaxPage <= 0 / not set: means unlimited.If MaxPage >= 1: @@ -109,10 +110,11 @@ CameraSupport.CamConfigClass.CamConfigClass : contains various configuration // MaxPage > 1 : Limited Multi Capture Mode public static int MaxPage = 0; ``` -- **ColorMode** - To Set the capture color mode- supporting color and grayscale. -- **EnableFlash** - Enable Document capture specific flash control for SDK camera. +- **ColorMode** - To Set the capture color mode - supporting color and grayscale. +- +- **EnableFlash** - Enable Document capture specific flash control for SDK camera. ```java - CameraSupport.CamConfigClass.EnableFlash = true; + Config.CaptureSupport.EnableFlash = true; ``` - **CaptureSound** - To Enable camera capture sound. ```java @@ -120,50 +122,19 @@ CameraSupport.CamConfigClass.CamConfigClass : contains various configuration ``` - **DeviceInfo** - Will share all general information about the device. ```java - CameraSupport.CamConfigClass.DeviceInfo; + Config.CaptureSupport.DeviceInfo; ``` - **SDKInfo** - Contains all version related information on SDK. ```java - CameraSupport.CamConfigClass.SDKInfo; + Config.CaptureSupport.SDKInfo; ``` -- CameraToggle - Toggle camera between front and back. +- **CameraToggle** - Toggle camera between front and back. ```java - CameraSupport.CamConfigClass.CameraToggle = 2; - //0-Disable camera toggle option. - //1-Enable camera toggle option with Front camera by default. - //2-Enable camera toggle option with Back camera by default. - ``` - -- **GetTiffForLastCapture** - Build Tiff file output file from last captured set of images. - ```java - CameraHelper.GetTiffForLastCapture(outPutFileWithpath); - //on success, will respond with string : "SUCCESS:::TiffFilePath"; - //use ":::" char. key to split the response. - //on failure,will respond with string : "FAILED:::Reason for failure"; - //use ":::" char. key to split the response. - //on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo - ``` -- **GetPDFForLastCapture** - Build PDF file output file from last captured set of images. - ```java - CameraHelper.GetPDFForLastCapture(outPutFileWithpath); - //on success, will respond with string : "SUCCESS:::PdfFilePath"; - //use ":::" char. key to split the response. - //on failure,will respond with string : "FAILED:::Reason for failure"; - //use ":::" char. key to split the response. - //on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo - ``` -- **BuildTiff** - Build .tiff file output from the list of images shared. - ```java - CameraHelper.BuildTiff(ArrayList ImageCol, String OutputTiffFilePath) - *@param "Image File path collection as ArrayList" - *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::TIFF file path". - ``` -- **BuildPDF** - Build PDF file output file from last captured set of images. - ```java - CameraHelper.BuildPDF(outPutFileWithpath); - *@param "Image File path collection as ArrayList" - *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::PDF file path". + Config.CaptureSupport.CameraToggle = CameraToggleType.ENABLE_BACK_DEFAULT; + //DISABLED (0) -Disable camera toggle option. + //ENABLE_BACK_DEFAULT (1) -Enable camera toggle option with Front camera by default. + //ENABLE_FRONT_DEFAULT (2) -Enable camera toggle option with Back camera by default. ``` ## ImgHelper Following are the options/methods available from class **ImgHelper** : @@ -217,7 +188,7 @@ ImgHelper ImageHelper = new ImgHelper(this); - ***CompressToJPEG*** - *This method will Compress the provided bitmap image and will save to given path..* ```java - Boolean Iscompressed = CompressToJPEG(bitmap,outputFilePath); + Boolean Iscompressed = ImageHelper.CompressToJPEG(bitmap,outputFilePath); /* Boolean CompressToJPEG(Bitmap bm,String outputFilePath) throws ImgException @@ -228,12 +199,42 @@ ImgHelper ImageHelper = new ImgHelper(this); - ***rotateBitmap*** - *This method will rotate the image to preferred orientation.* ```java - Bitmap rotatedBm = rotateBitmapDegree(nBm, RotationDegree); + Bitmap rotatedBm = ImageHelper.rotateBitmapDegree(nBm, RotationDegree); /* Bitmap rotateBitmapDegree(Bitmap bitmap,int Degree) throws ImgException */ - ``` + ``` + - **GetTiffForLastCapture** - Build Tiff file output file from last captured set of images. + ```java + ImageHelper.GetTiffForLastCapture(outPutFileWithpath); + //on success, will respond with string : "SUCCESS:::TiffFilePath"; + //use ":::" char. key to split the response. + //on failure,will respond with string : "FAILED:::Reason for failure"; + //use ":::" char. key to split the response. + //on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo + ``` +- **GetPDFForLastCapture** - Build PDF file output file from last captured set of images. + ```java + ImageHelper.GetPDFForLastCapture(outPutFileWithpath); + //on success, will respond with string : "SUCCESS:::PdfFilePath"; + //use ":::" char. key to split the response. + //on failure,will respond with string : "FAILED:::Reason for failure"; + //use ":::" char. key to split the response. + //on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo + ``` +- **BuildTiff** - Build .tiff file output from the list of images shared. + ```java + ImageHelper.BuildTiff(ArrayList ImageCol, String OutputTiffFilePath) + *@param "Image File path collection as ArrayList" + *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::TIFF file path". + ``` +- **BuildPDF** - Build PDF file output file from last captured set of images. + ```java + ImageHelper.BuildPDF(outPutFileWithpath); + *@param "Image File path collection as ArrayList" + *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::PDF file path". + ``` ## ImgException As a part of exceptional error handling **ImgException** class is available. From fcbdcf97d545fd34fef0a306f9b10e0906df7b72 Mon Sep 17 00:00:00 2001 From: Amalkarunakaran Date: Wed, 21 Jun 2023 13:26:00 +0530 Subject: [PATCH 3/4] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0984773..9d10da4 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,11 @@ Config.CaptureSupport : contains various configurations as follows: public static int MaxPage = 0; ``` - **ColorMode** - To Set the capture color mode - supporting color and grayscale. -- + ```java + Config.CaptureSupport.ColorMode = Config.CaptureSupport.ColorModes.RBG; + //RBG (1) - Use capture flow in color mode. + //GREY (2) - Use capture flow in grey scale mode. + ``` - **EnableFlash** - Enable Document capture specific flash control for SDK camera. ```java Config.CaptureSupport.EnableFlash = true; From 6d655eb587fbb77113d9e50eeacccce4500ceb1c Mon Sep 17 00:00:00 2001 From: Amalkarunakaran Date: Wed, 21 Jun 2023 14:01:56 +0530 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d10da4..bc85700 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ Config.CaptureSupport : contains various configurations as follows: ``` - **CaptureSound** - To Enable camera capture sound. ```java - CameraSupport.CamConfigClass.CaptureSound = true; + Config.CaptureSupport.CaptureSound = true; ``` - **DeviceInfo** - Will share all general information about the device. ```java