@@ -59,7 +59,7 @@ Based on the requirement any one or all classes can be used. And need to import
5959 // OR : can import only required classes as per use cases.
6060 import com.extrieve.quickcapture.sdk.ImgHelper ;
6161 import com.extrieve.quickcapture.sdk.CameraHelper ;
62- import com.extrieve.quickcapture.sdk.CameraSupport ;
62+ import com.extrieve.quickcapture.sdk.Config ;
6363 import com.extrieve.quickcapture.sdk.ImgException ;
6464 ```
6565---
@@ -70,7 +70,7 @@ This class will be implemented as an activity. This class can be ini
7070```
7171
7272``` java
73- Intent CameraIntent = new Intent (this ,Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" )); UriphotoURI = Uri . parse(CameraSupport . CamConfigClass . OutputPath );
73+ Intent CameraIntent = new Intent (this ,Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" )); UriphotoURI = Uri . parse(Config . CaptureSupport . OutputPath );
7474this . grantUriPermission(this . getPackageName(),photoURI,Intent . FLAG_GRANT_WRITE_URI_PERMISSION | Intent . FLAG_GRANT_READ_URI_PERMISSION );
7575if (Build . VERSION. SDK_INT <= Build . VERSION_CODES. LOLLIPOP ) {
7676 CameraIntent . addFlags(Intent . FLAG_GRANT_WRITE_URI_PERMISSION );
@@ -93,12 +93,13 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable
9393 finishActivity(REQUEST_CODE_FILE_RETURN );
9494}
9595```
96- Camera Helper having a supporting class with static configuration
97- CameraSupport.CamConfigClass.CamConfigClass : contains various configurations as follows:
96+ SDK included a a supporting class with static configuration - which includes all configurations related to SDK.
97+ - Confg contains a sub configuration collection **CaptureSupport** - contains all the Capture & review related configurations.
98+ Config.CaptureSupport : contains various configurations as follows:
9899
99100- **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.
100101 ```java
101- CameraSupport.CamConfigClass .OutputPath = “ pass output path as string” ;
102+ Config.CaptureSupport .OutputPath = " pass output path sd string" ;
102103 ```
103104- **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
104105 > if MaxPage <= 0 / not set: means unlimited.If MaxPage >= 1:
@@ -109,61 +110,35 @@ CameraSupport.CamConfigClass.CamConfigClass : contains various configuration
109110 // MaxPage > 1 : Limited Multi Capture Mode
110111 public static int MaxPage = 0;
111112 ```
112- - **ColorMode** - To Set the capture color mode- supporting color and grayscale.
113- - **EnableFlash** - Enable Document capture specific flash control for SDK camera.
113+ - **ColorMode** - To Set the capture color mode - supporting color and grayscale.
114114 ```java
115- CameraSupport.CamConfigClass.EnableFlash = true;
115+ Config.CaptureSupport.ColorMode = Config.CaptureSupport.ColorModes.RBG;
116+ // RBG (1) - Use capture flow in color mode.
117+ // GREY (2) - Use capture flow in grey scale mode.
118+ ```
119+ - **EnableFlash** - Enable Document capture specific flash control for SDK camera.
120+ ```java
121+ Config.CaptureSupport.EnableFlash = true;
116122 ```
117123- **CaptureSound** - To Enable camera capture sound.
118124 ```java
119- CameraSupport.CamConfigClass .CaptureSound = true;
125+ Config.CaptureSupport .CaptureSound = true;
120126 ```
121127- **DeviceInfo** - Will share all general information about the device.
122128 ```java
123- CameraSupport.CamConfigClass .DeviceInfo;
129+ Config.CaptureSupport .DeviceInfo;
124130 ```
125131- **SDKInfo** - Contains all version related information on SDK.
126132 ```java
127- CameraSupport.CamConfigClass .SDKInfo;
133+ Config.CaptureSupport .SDKInfo;
128134 ```
129135
130- - CameraToggle - Toggle camera between front and back.
131- ```java
132- CameraSupport.CamConfigClass.CameraToggle = 2;
133- // 0-Disable camera toggle option.
134- // 1-Enable camera toggle option with Front camera by default.
135- // 2-Enable camera toggle option with Back camera by default.
136- ```
137-
138- - **GetTiffForLastCapture** - Build Tiff file output file from last captured set of images.
139- ```java
140- CameraHelper.GetTiffForLastCapture(outPutFileWithpath);
141- // on success, will respond with string : "SUCCESS:::TiffFilePath";
142- // use ":::" char. key to split the response.
143- // on failure,will respond with string : "FAILED:::Reason for failure";
144- // use ":::" char. key to split the response.
145- // on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo
146- ```
147- - **GetPDFForLastCapture** - Build PDF file output file from last captured set of images.
136+ - **CameraToggle** - Toggle camera between front and back.
148137 ```java
149- CameraHelper.GetPDFForLastCapture(outPutFileWithpath);
150- // on success, will respond with string : "SUCCESS:::PdfFilePath";
151- // use ":::" char. key to split the response.
152- // on failure,will respond with string : "FAILED:::Reason for failure";
153- // use ":::" char. key to split the response.
154- // on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo
155- ```
156- - **BuildTiff** - Build .tiff file output from the list of images shared.
157- ```java
158- CameraHelper.BuildTiff(ArrayList<String> ImageCol, String OutputTiffFilePath)
159- *@param "Image File path collection as ArrayList<String>"
160- *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::TIFF file path".
161- ```
162- - **BuildPDF** - Build PDF file output file from last captured set of images.
163- ```java
164- CameraHelper.BuildPDF(outPutFileWithpath);
165- *@param "Image File path collection as ArrayList<String>"
166- *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::PDF file path".
138+ Config.CaptureSupport.CameraToggle = CameraToggleType.ENABLE_BACK_DEFAULT;
139+ // DISABLED (0) -Disable camera toggle option.
140+ // ENABLE_BACK_DEFAULT (1) -Enable camera toggle option with Front camera by default.
141+ // ENABLE_FRONT_DEFAULT (2) -Enable camera toggle option with Back camera by default.
167142 ```
168143## ImgHelper
169144Following are the options/methods available from class **ImgHelper** :
@@ -217,7 +192,7 @@ ImgHelper ImageHelper = new ImgHelper(this);
217192- ***CompressToJPEG*** - *This method will Compress the provided bitmap image and will save to given path..*
218193 ```java
219194
220- Boolean Iscompressed = CompressToJPEG(bitmap,outputFilePath);
195+ Boolean Iscompressed = ImageHelper. CompressToJPEG(bitmap,outputFilePath);
221196 /*
222197 Boolean CompressToJPEG(Bitmap bm,String outputFilePath)
223198 throws ImgException
@@ -228,12 +203,42 @@ ImgHelper ImageHelper = new ImgHelper(this);
228203- ***rotateBitmap*** - *This method will rotate the image to preferred orientation.*
229204 ```java
230205
231- Bitmap rotatedBm = rotateBitmapDegree(nBm, RotationDegree);
206+ Bitmap rotatedBm = ImageHelper. rotateBitmapDegree(nBm, RotationDegree);
232207 /*
233208 Bitmap rotateBitmapDegree(Bitmap bitmap,int Degree)
234209 throws ImgException
235210 */
236- ```
211+ ```
212+ - **GetTiffForLastCapture** - Build Tiff file output file from last captured set of images.
213+ ```java
214+ ImageHelper.GetTiffForLastCapture(outPutFileWithpath);
215+ // on success, will respond with string : "SUCCESS:::TiffFilePath";
216+ // use ":::" char. key to split the response.
217+ // on failure,will respond with string : "FAILED:::Reason for failure";
218+ // use ":::" char. key to split the response.
219+ // on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo
220+ ```
221+ - **GetPDFForLastCapture** - Build PDF file output file from last captured set of images.
222+ ```java
223+ ImageHelper.GetPDFForLastCapture(outPutFileWithpath);
224+ // on success, will respond with string : "SUCCESS:::PdfFilePath";
225+ // use ":::" char. key to split the response.
226+ // on failure,will respond with string : "FAILED:::Reason for failure";
227+ // use ":::" char. key to split the response.
228+ // on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo
229+ ```
230+ - **BuildTiff** - Build .tiff file output from the list of images shared.
231+ ```java
232+ ImageHelper.BuildTiff(ArrayList<String> ImageCol, String OutputTiffFilePath)
233+ *@param "Image File path collection as ArrayList<String>"
234+ *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::TIFF file path".
235+ ```
236+ - **BuildPDF** - Build PDF file output file from last captured set of images.
237+ ```java
238+ ImageHelper.BuildPDF(outPutFileWithpath);
239+ *@param "Image File path collection as ArrayList<String>"
240+ *@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::PDF file path".
241+ ```
237242
238243## ImgException
239244As a part of exceptional error handling **ImgException** class is available.
0 commit comments