Skip to content

Commit a526de8

Browse files
authored
Merge pull request #19 from klippa-app/feature/update-implementation
Bumped Android version to 2.0.7.
2 parents c9fc18a + cd25703 commit a526de8

File tree

7 files changed

+32
-10
lines changed

7 files changed

+32
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.12
2+
3+
* Bump Android to 2.0.7
4+
15
## 0.1.11
26

37
* Fixed issue with permission checking on Android

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ KlippaScannerSDK.getCameraPermission().then((authStatus) => {
182182
// After capture, show a check mark preview with this success message, instead of a preview of the image.
183183
Success: {message: "Success!", previewDuration: 0.3},
184184

185-
// Whether the camera automatically saves the images to the camera roll. Default true. (iOS version 0.4.2 and up only)
185+
// Whether the camera automatically saves the images to the camera roll (iOS) / gallery (Android). Default true.
186186
StoreImagesToCameraRoll: true,
187187

188188
// The threshold sensitive the motion detection is. (lower value is higher sensitivity, default 200).

android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
// original location:
1111
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
1212

13-
def DEFAULT_COMPILE_SDK_VERSION = 28
14-
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
15-
def DEFAULT_MIN_SDK_VERSION = 16
16-
def DEFAULT_TARGET_SDK_VERSION = 28
13+
def DEFAULT_COMPILE_SDK_VERSION = 31
14+
def DEFAULT_BUILD_TOOLS_VERSION = '29.0.2'
15+
def DEFAULT_MIN_SDK_VERSION = 21
16+
def DEFAULT_TARGET_SDK_VERSION = 31
1717

1818
def safeExtGet(prop, fallback) {
1919
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -72,7 +72,7 @@ repositories {
7272
}
7373

7474
dependencies {
75-
def klippaScannerVersion = project.hasProperty('klippaScannerVersion') ? project.klippaScannerVersion : "2.0.6"
75+
def klippaScannerVersion = project.hasProperty('klippaScannerVersion') ? project.klippaScannerVersion : "2.0.7"
7676

7777
//noinspection GradleDynamicVersion
7878
implementation 'com.facebook.react:react-native:+' // From node_modules

android/gradle.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## For more details on how to configure your build environment visit
2+
# http://www.gradle.org/docs/current/userguide/build_environment.html
3+
#
4+
# Specifies the JVM arguments used for the daemon process.
5+
# The setting is particularly useful for tweaking memory settings.
6+
# Default value: -Xmx1024m -XX:MaxPermSize=256m
7+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
8+
#
9+
# When configured, Gradle will run in incubating parallel mode.
10+
# This option should only be used with decoupled projects. More details, visit
11+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
12+
# org.gradle.parallel=true
13+
#Wed Jan 19 11:09:56 CET 2022
14+
android.useAndroidX=true

android/src/main/java/com/klippa/reactscanner/KlippaScannerSDKModule.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ public void getCameraResult(final ReadableMap config, final Promise promise) {
239239
cameraIntent.putExtra(com.klippa.scanner.KlippaScanner.IMAGE_MOVING_SENSITIVITY, config.getInt("ImageMovingSensitivityAndroid"));
240240
}
241241

242+
if (config.hasKey("StoreImagesToCameraRoll")) {
243+
cameraIntent.putExtra(com.klippa.scanner.KlippaScanner.STORE_IMAGES_TO_GALLERY, config.getBoolean("StoreImagesToCameraRoll"));
244+
}
245+
242246
currentActivity.startActivityForResult(cameraIntent, CAMERA_REQUEST_CODE);
243247
} catch (Exception e) {
244248
mCameraPromise.reject(E_FAILED_TO_SHOW_CAMERA, e);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@klippa/react-native-klippa-scanner-sdk",
33
"title": "React Native Klippa Scanner SDK",
4-
"version": "0.1.11",
4+
"version": "0.1.12",
55
"description": "Allows you to take pictures with the Klippa Scanner SDK from React Native.",
66
"main": "index.js",
77
"files": [

types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ export class CameraConfig {
9494
// The message to display when the limit has been reached.
9595
ImageLimitReachedMessage?: string;
9696

97+
// Whether the camera automatically saves the images to the camera roll (iOS) / gallery (Android). Default true.
98+
StoreImagesToCameraRoll?: boolean;
99+
97100
// Android options.
98101

99102
// Where to put the image results.
@@ -149,9 +152,6 @@ export class CameraConfig {
149152

150153
// The threshold sensitive the motion detection is. (lower value is higher sensitivity, default 200).
151154
ImageMovingSensitivityiOS?: number;
152-
153-
// Whether the camera automatically saves the images to the camera roll. Default true. (iOS SDK version 0.4.2 and up only)
154-
StoreImagesToCameraRoll?: boolean;
155155
}
156156

157157
export class CameraResult {

0 commit comments

Comments
 (0)