@@ -59,7 +59,7 @@ Based on the requirement any one or all classes can be used. And need to import
59
59
// OR : can import only required classes as per use cases.
60
60
import com.extrieve.quickcapture.sdk.ImgHelper ;
61
61
import com.extrieve.quickcapture.sdk.CameraHelper ;
62
- import com.extrieve.quickcapture.sdk.CameraSupport ;
62
+ import com.extrieve.quickcapture.sdk.Config ;
63
63
import com.extrieve.quickcapture.sdk.ImgException ;
64
64
```
65
65
---
@@ -70,7 +70,7 @@ This class will be implemented as an activity. This class can be ini
70
70
```
71
71
72
72
``` 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 );
74
74
this . grantUriPermission(this . getPackageName(),photoURI,Intent . FLAG_GRANT_WRITE_URI_PERMISSION | Intent . FLAG_GRANT_READ_URI_PERMISSION );
75
75
if (Build . VERSION. SDK_INT <= Build . VERSION_CODES. LOLLIPOP ) {
76
76
CameraIntent . addFlags(Intent . FLAG_GRANT_WRITE_URI_PERMISSION );
@@ -93,12 +93,13 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable
93
93
finishActivity(REQUEST_CODE_FILE_RETURN );
94
94
}
95
95
```
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:
98
99
99
100
- **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.
100
101
```java
101
- CameraSupport.CamConfigClass .OutputPath = “ pass output path as string” ;
102
+ Config.CaptureSupport .OutputPath = " pass output path sd string" ;
102
103
```
103
104
- **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
104
105
> if MaxPage <= 0 / not set: means unlimited.If MaxPage >= 1:
@@ -109,61 +110,35 @@ CameraSupport.CamConfigClass.CamConfigClass : contains various configuration
109
110
// MaxPage > 1 : Limited Multi Capture Mode
110
111
public static int MaxPage = 0;
111
112
```
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.
114
114
```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;
116
122
```
117
123
- **CaptureSound** - To Enable camera capture sound.
118
124
```java
119
- CameraSupport.CamConfigClass .CaptureSound = true;
125
+ Config.CaptureSupport .CaptureSound = true;
120
126
```
121
127
- **DeviceInfo** - Will share all general information about the device.
122
128
```java
123
- CameraSupport.CamConfigClass .DeviceInfo;
129
+ Config.CaptureSupport .DeviceInfo;
124
130
```
125
131
- **SDKInfo** - Contains all version related information on SDK.
126
132
```java
127
- CameraSupport.CamConfigClass .SDKInfo;
133
+ Config.CaptureSupport .SDKInfo;
128
134
```
129
135
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.
148
137
```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.
167
142
```
168
143
## ImgHelper
169
144
Following are the options/methods available from class **ImgHelper** :
@@ -217,7 +192,7 @@ ImgHelper ImageHelper = new ImgHelper(this);
217
192
- ***CompressToJPEG*** - *This method will Compress the provided bitmap image and will save to given path..*
218
193
```java
219
194
220
- Boolean Iscompressed = CompressToJPEG(bitmap,outputFilePath);
195
+ Boolean Iscompressed = ImageHelper. CompressToJPEG(bitmap,outputFilePath);
221
196
/*
222
197
Boolean CompressToJPEG(Bitmap bm,String outputFilePath)
223
198
throws ImgException
@@ -228,12 +203,42 @@ ImgHelper ImageHelper = new ImgHelper(this);
228
203
- ***rotateBitmap*** - *This method will rotate the image to preferred orientation.*
229
204
```java
230
205
231
- Bitmap rotatedBm = rotateBitmapDegree(nBm, RotationDegree);
206
+ Bitmap rotatedBm = ImageHelper. rotateBitmapDegree(nBm, RotationDegree);
232
207
/*
233
208
Bitmap rotateBitmapDegree(Bitmap bitmap,int Degree)
234
209
throws ImgException
235
210
*/
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
+ ```
237
242
238
243
## ImgException
239
244
As a part of exceptional error handling **ImgException** class is available.
0 commit comments