Skip to content

Commit 425b1d0

Browse files
Modifications for new update.
Modifications in test application w.r.t new SDK version.
1 parent c8b0026 commit 425b1d0

File tree

8 files changed

+52
-21
lines changed

8 files changed

+52
-21
lines changed

java_sample/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

java_sample/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

java_sample/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ dependencies {
3333
implementation 'androidx.appcompat:appcompat:1.6.1'
3434
implementation 'com.google.android.material:material:1.5.0'
3535
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
36-
implementation 'com.extrieve.quickcapture:QCv2:2.1.2'
36+
/*DEV_HELP : link the preferred SDK version from maven repo by extrieve.*/
37+
implementation 'com.extrieve.quickcapture:QCv3:3.0.5'
3738
}

java_sample/app/src/main/java/com/extrieve/quickcapture/docappjava/MainActivity.java

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
package com.extrieve.quickcapture.docappjava;
22

3-
import androidx.activity.result.ActivityResult;
4-
import androidx.activity.result.ActivityResultLauncher;
5-
import androidx.activity.result.contract.ActivityResultContracts;
6-
import androidx.annotation.NonNull;
7-
import androidx.appcompat.app.AppCompatActivity;
8-
import androidx.core.app.ActivityCompat;
9-
import androidx.core.content.ContextCompat;
10-
113
import android.app.Activity;
124
import android.content.ContextWrapper;
135
import android.content.Intent;
@@ -17,15 +9,21 @@
179
import android.net.Uri;
1810
import android.os.Build;
1911
import android.os.Bundle;
20-
import android.os.Environment;
21-
import android.provider.Settings;
2212
import android.util.Log;
2313
import android.widget.ImageView;
2414
import android.widget.Toast;
2515

26-
/*DEV_HELP : Import SDK from QuickCapture lib with : com.extrieve.quickcapture.sdk.**/
27-
import com.extrieve.quickcapture.sdk.*;
28-
import com.extrieve.quickcapture.sdk.CameraSupport.CamConfigClass;
16+
import androidx.activity.result.ActivityResult;
17+
import androidx.activity.result.ActivityResultLauncher;
18+
import androidx.activity.result.contract.ActivityResultContracts;
19+
import androidx.annotation.NonNull;
20+
import androidx.appcompat.app.AppCompatActivity;
21+
import androidx.core.app.ActivityCompat;
22+
import androidx.core.content.ContextCompat;
23+
24+
import com.extrieve.quickcapture.sdk.CameraHelper;
25+
import com.extrieve.quickcapture.sdk.Config;
26+
import com.extrieve.quickcapture.sdk.ImgHelper;
2927

3028
import java.io.File;
3129
import java.io.IOException;
@@ -105,7 +103,7 @@ private void SetConfig() {
105103
ImageHelper.SetDPI(200);//int dpi_val = 100, 150, 200, 300, 500, 600;
106104

107105
//can set output file path
108-
CamConfigClass.OutputPath = BuildStoragePath();
106+
Config.CaptureSupport.OutputPath = BuildStoragePath();
109107
}
110108

111109
/*DEV_HELP : BuildStoragePath*/
@@ -130,7 +128,7 @@ private void handleCaptureActivityResult(ActivityResult result){
130128
String Description = (String) data.getExtras().get("DESCRIPTION");
131129
if (!Status) {
132130
String imageCaptureLog = "Description : " + Description +
133-
".Exception: " + CameraSupport.CamConfigClass.LastLogInfo;
131+
".Exception: " + Config.CaptureSupport.LastLogInfo;
134132
Log.d("INFO", imageCaptureLog);
135133
Toast.makeText(this, imageCaptureLog, Toast.LENGTH_LONG).show();
136134
finishActivity(REQUEST_CODE_FILE_RETURN);
@@ -175,7 +173,7 @@ private void OpenCameraActivity() {
175173
try {
176174
/*DEV_HELP :redirecting to camera*/
177175
Intent CameraIntent = new Intent(this, Class.forName("com.extrieve.quickcapture.sdk.CameraHelper"));
178-
Uri photoURI = Uri.parse(CamConfigClass.OutputPath);
176+
Uri photoURI = Uri.parse(Config.CaptureSupport.OutputPath);
179177
this.grantUriPermission(this.getPackageName(), photoURI,
180178
Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
181179
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) {

kotlin_sample/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

kotlin_sample/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

kotlin_sample/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ dependencies {
3838
implementation 'androidx.appcompat:appcompat:1.6.1'
3939
implementation 'com.google.android.material:material:1.5.0'
4040
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
41-
implementation 'com.extrieve.quickcapture:QCv2:2.1.2'
41+
implementation 'com.extrieve.quickcapture:QCv3:3.0.5'
4242
}

kotlin_sample/app/src/main/java/com/extrieve/quickcapture/docappkotlin/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class MainActivity : AppCompatActivity() {
101101
imageHelper!!.SetDPI(200) //int dpi_val = 100, 150, 200, 300, 500, 600;
102102

103103
//can set output file path
104-
CameraSupport.CamConfigClass.OutputPath = buildStoragePath()
104+
Config.CaptureSupport.OutputPath = buildStoragePath()
105105
}
106106

107107
/*DEV_HELP : BuildStoragePath*/
@@ -125,7 +125,7 @@ class MainActivity : AppCompatActivity() {
125125
val description = data!!.extras!!["DESCRIPTION"] as String?
126126
if (!status!!) {
127127
val imageCaptureLog = "Description : " + description +
128-
".Exception: " + CameraSupport.CamConfigClass.LastLogInfo
128+
".Exception: " + Config.CaptureSupport.LastLogInfo
129129
Log.d("INFO", imageCaptureLog)
130130
Toast.makeText(this, imageCaptureLog, Toast.LENGTH_LONG).show()
131131
finishActivity(MainActivity.Companion.REQUEST_CODE_FILE_RETURN)
@@ -172,7 +172,7 @@ class MainActivity : AppCompatActivity() {
172172
try {
173173
/*DEV_HELP :redirecting to camera*/
174174
val captureIntent = Intent(this, Class.forName("com.extrieve.quickcapture.sdk.CameraHelper"))
175-
val photoURI = Uri.parse(CameraSupport.CamConfigClass.OutputPath)
175+
val photoURI = Uri.parse(Config.CaptureSupport.OutputPath)
176176
grantUriPermission(
177177
this.packageName, photoURI,
178178
Intent.FLAG_GRANT_WRITE_URI_PERMISSION or Intent.FLAG_GRANT_READ_URI_PERMISSION

0 commit comments

Comments
 (0)