@@ -94,14 +94,21 @@ SDK having multiple openration flow as follows :
9494
9595``` java
9696// JAVA
97- Intent CameraIntent = new Intent (this ,Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" ));
97+ // Set CaptureMode as CAMERA_CAPTURE_REVIEW
98+ Config . CaptureSupport . CaptureMode = Config . CaptureSupport . CaptureModes . CAMERA_CAPTURE_REVIEW ;
99+ // set ppermission for output path that set in config.
98100UriphotoURI = Uri . parse(Config . CaptureSupport . OutputPath );
99101this . grantUriPermission(this . getPackageName(),photoURI,Intent . FLAG_GRANT_WRITE_URI_PERMISSION | Intent . FLAG_GRANT_READ_URI_PERMISSION );
102+
103+ // Create CameraIntent for CameraHelper activity call.
104+ Intent CameraIntent = new Intent (this ,Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" ));
100105if (Build . VERSION. SDK_INT <= Build . VERSION_CODES. LOLLIPOP ) {
101106 CameraIntent . addFlags(Intent . FLAG_GRANT_WRITE_URI_PERMISSION );
102107}
108+ // Call the Activity.
103109startActivityForResult(CameraIntent ,REQUEST_CODE_FILE_RETURN );
104110
111+ // On activity result, recieve the captured, reviewed, cropped, optimised & compressed image colletion as array.
105112@Override
106113protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data)
107114{
@@ -138,25 +145,18 @@ try {
138145}
139146```
140147
141- ** CAMERA_CAPTURE_REVIEW **
148+ ** SYSTEM_CAMERA_CAPTURE_REVIEW **
142149
143150```java
144151// JAVA
145- // Set CaptureMode as CAMERA_CAPTURE_REVIEW
146- Config . CaptureSupport . CaptureMode = Config . CaptureSupport . CaptureModes . CAMERA_CAPTURE_REVIEW ;
147- // set ppermission for output path that set in config.
152+ Intent CameraIntent = new Intent (this ,Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" ));
148153UriphotoURI = Uri . parse(Config . CaptureSupport . OutputPath );
149154this . grantUriPermission(this . getPackageName(),photoURI,Intent . FLAG_GRANT_WRITE_URI_PERMISSION | Intent . FLAG_GRANT_READ_URI_PERMISSION );
150-
151- // Create CameraIntent for CameraHelper activity call.
152- Intent CameraIntent = new Intent (this ,Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" ));
153155if (Build . VERSION. SDK_INT <= Build . VERSION_CODES. LOLLIPOP ) {
154156 CameraIntent . addFlags(Intent . FLAG_GRANT_WRITE_URI_PERMISSION );
155157}
156- // Call the Activity.
157158startActivityForResult(CameraIntent ,REQUEST_CODE_FILE_RETURN );
158159
159- // On activity result, recieve the captured, reviewed, cropped, optimised & compressed image colletion as array.
160160@Override
161161protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data)
162162{
@@ -193,7 +193,54 @@ try {
193193}
194194```
195195
196+ ** IMAGE_ATTACH_REVIEW **
197+
198+ ```java
199+ // JAVA
200+ Intent CameraIntent = new Intent (this ,Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" ));
201+ UriphotoURI = Uri . parse(Config . CaptureSupport . OutputPath );
202+ this . grantUriPermission(this . getPackageName(),photoURI,Intent . FLAG_GRANT_WRITE_URI_PERMISSION | Intent . FLAG_GRANT_READ_URI_PERMISSION );
203+ if (Build . VERSION. SDK_INT <= Build . VERSION_CODES. LOLLIPOP ) {
204+ CameraIntent . addFlags(Intent . FLAG_GRANT_WRITE_URI_PERMISSION );
205+ }
206+ startActivityForResult(CameraIntent ,REQUEST_CODE_FILE_RETURN );
196207
208+ @Override
209+ protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data)
210+ {
211+ super . onActivityResult(requestCode, resultCode, data);
212+ if (requestCode == REQUEST_CODE_FILE_RETURN && resultCode == Activity . RESULT_OK )
213+ {
214+ Boolean Status = (Boolean ) data. getExtras(). get(" STATUS" );
215+ String Description = (String ) data. getExtras(). get(" DESCRIPTION" );
216+ if (Status == false ){ // Failed to capture
217+ finishActivity(REQUEST_CODE_FILE_RETURN ); return ;
218+ }
219+ FileCollection = (ArrayList<String > ) data. getExtras(). get(" fileCollection" );
220+ // FileCollection //: will contains all capture images path as string
221+ finishActivity(REQUEST_CODE_FILE_RETURN );
222+ }
223+ ```
224+ ```kotlin
225+ // Kotlin
226+ try {
227+ /* DEV_HELP :redirecting to camera*/
228+ val captureIntent = Intent(this , Class . forName(" com.extrieve.quickcapture.sdk.CameraHelper" ))
229+ val photoURI = Uri . parse(Config . CaptureSupport . OutputPath )
230+ grantUriPermission(
231+ this . packageName, photoURI,
232+ Intent . FLAG_GRANT_WRITE_URI_PERMISSION or Intent . FLAG_GRANT_READ_URI_PERMISSION
233+ )
234+ if (Build . VERSION. SDK_INT <= Build . VERSION_CODES. LOLLIPOP ) {
235+ captureIntent. addFlags(Intent . FLAG_GRANT_WRITE_URI_PERMISSION )
236+ }
237+ captureActivityResultLauncher!! . launch(captureIntent)
238+ } catch (ex: Exception ) {
239+ /* DEV_HELP : TODO : handle invalid Exception*/
240+ Toast . makeText(this , " Failed to open camera -" + ex. message, Toast . LENGTH_LONG ). show()
241+ }
242+ ```
243+ ## Confg
197244SDK included 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.
198245Config.CaptureSupport : contains various configurations as follows:
199246
0 commit comments