From c24c729f04de28946657f64e3669dce93b41775d Mon Sep 17 00:00:00 2001 From: Alex Lementuev Date: Fri, 1 Feb 2019 14:16:22 -0800 Subject: [PATCH 1/3] Added option to encrypt storage --- .../android/sdk/reactlibrary/RNApptentiveModule.java | 5 +++++ sample/App.js | 1 + 2 files changed, 6 insertions(+) diff --git a/android/src/main/java/com/apptentive/android/sdk/reactlibrary/RNApptentiveModule.java b/android/src/main/java/com/apptentive/android/sdk/reactlibrary/RNApptentiveModule.java index cb02d85..60c6bc1 100644 --- a/android/src/main/java/com/apptentive/android/sdk/reactlibrary/RNApptentiveModule.java +++ b/android/src/main/java/com/apptentive/android/sdk/reactlibrary/RNApptentiveModule.java @@ -82,6 +82,11 @@ public void register(ReadableMap configurationMap, Promise promise) { configuration.setShouldSanitizeLogMessages(shouldSanitizeLogMessages); } + Boolean shouldEncryptStorage = ObjectUtils.as(config.get("shouldEncryptStorage"), Boolean.class); + if (shouldEncryptStorage != null) { + configuration.setShouldEncryptStorage(shouldEncryptStorage); + } + Apptentive.register(application, configuration); ApptentiveInternal instance = ObjectUtils.as(ApptentiveInternal.getInstance(), ApptentiveInternal.class); diff --git a/sample/App.js b/sample/App.js index 5d08f41..9818057 100644 --- a/sample/App.js +++ b/sample/App.js @@ -29,6 +29,7 @@ const credentials = Platform.select({ android: { apptentiveKey: '', apptentiveSignature: '', + // shouldEncryptStorage: true, }, }); From 1ca0bdefdca20486f7b621707c84f3f839b16350 Mon Sep 17 00:00:00 2001 From: Alex Lementuev Date: Fri, 1 Feb 2019 15:25:54 -0800 Subject: [PATCH 2/3] Added shouldEncryptStorage flag to ApptentiveConfiguration --- js/index.js | 3 ++- sample/App.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/index.js b/js/index.js index 2aa4203..2cf0270 100644 --- a/js/index.js +++ b/js/index.js @@ -10,9 +10,10 @@ export class ApptentiveConfiguration { this.apptentiveSignature = apptentiveSignature; this.logLevel = 'info'; this.shouldSanitizeLogMessages = true; + this.shouldEncryptStorage = false; } toString() { - return `(apptentiveKey=${this.apptentiveKey}, apptentiveSignature=${this.apptentiveSignature}, logLevel=${this.logLevel}, shouldSanitizeLogMessages=${this.shouldSanitizeLogMessages})`; + return `(apptentiveKey=${this.apptentiveKey}, apptentiveSignature=${this.apptentiveSignature}, logLevel=${this.logLevel}, shouldSanitizeLogMessages=${this.shouldSanitizeLogMessages}, shouldEncryptStorage=${this.shouldEncryptStorage})`; } } diff --git a/sample/App.js b/sample/App.js index 9818057..0905ec6 100644 --- a/sample/App.js +++ b/sample/App.js @@ -29,7 +29,6 @@ const credentials = Platform.select({ android: { apptentiveKey: '', apptentiveSignature: '', - // shouldEncryptStorage: true, }, }); @@ -61,6 +60,7 @@ export default class App extends Component { // Override log level (optional) configuration.logLevel = 'verbose'; configuration.shouldSanitizeLogMessages = false; + // configuration.shouldEncryptStorage = true; // TODO: uncomment this line to enable encrypted storage // Register Apptentive Apptentive.register(configuration) From b55ba724aab82a2718ef70ccb3854ceee626c3d4 Mon Sep 17 00:00:00 2001 From: Alex Lementuev Date: Fri, 1 Feb 2019 15:58:11 -0800 Subject: [PATCH 3/3] Updated extension version to 5.4.1 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b181d85..9784fcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ This document lets you know what has changed in the React Native module. For cha - [Android Changelog](https://github.com/apptentive/apptentive-android/blob/master/CHANGELOG.md) - [iOS Changelog](https://github.com/apptentive/apptentive-ios/blob/master/CHANGELOG.md) +# 2019-02-01 - v5.4.1 + +- Added ability to control Android SDK encrypted storage +- Apptentive Android SDK: 5.4.0 +- Apptentive iOS SDK: 5.2.3 + # 2019-01-29 - v5.4.0 - Apptentive Android SDK: 5.4.0 diff --git a/package.json b/package.json index 2babd06..81f1b5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apptentive-react-native", - "version": "5.4.0", + "version": "5.4.1", "description": "React Native Module for Apptentive SDK", "main": "js/index.js", "scripts": {