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/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/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/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": { diff --git a/sample/App.js b/sample/App.js index 5d08f41..0905ec6 100644 --- a/sample/App.js +++ b/sample/App.js @@ -60,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)