Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #56 from apptentive/feature/android-encryption-option
Browse files Browse the repository at this point in the history
Added ability to control encryption on Android SDK
  • Loading branch information
weeeBox authored Feb 2, 2019
2 parents f33b98c + b55ba72 commit f1116f5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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})`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
1 change: 1 addition & 0 deletions sample/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f1116f5

Please sign in to comment.