From 13d39e0b85863cb57642c55a76c6566217da3ea2 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Wed, 6 Feb 2019 18:40:33 +0100 Subject: [PATCH] add feature to example --- KeychainExample/App.js | 18 ++++++++++++++++++ KeychainExample/android/build.gradle | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/KeychainExample/App.js b/KeychainExample/App.js index f46ea13..148c200 100644 --- a/KeychainExample/App.js +++ b/KeychainExample/App.js @@ -128,6 +128,7 @@ export default class KeychainExample extends Component { Save + this.load()} style={styles.button} @@ -136,6 +137,7 @@ export default class KeychainExample extends Component { Load + this.reset()} style={styles.button} @@ -144,6 +146,22 @@ export default class KeychainExample extends Component { Reset + + { + if (Platform.OS !== 'android') { + alert('android-only feature'); + return; + } + const level = await Keychain.getSecurityLevel(); + alert(level) + }} + style={styles.button} + > + + Get security level + + diff --git a/KeychainExample/android/build.gradle b/KeychainExample/android/build.gradle index 85d8f2f..2cbce0f 100644 --- a/KeychainExample/android/build.gradle +++ b/KeychainExample/android/build.gradle @@ -2,9 +2,9 @@ buildscript { ext { - buildToolsVersion = "27.0.3" + buildToolsVersion = "28.0.0" minSdkVersion = 16 - compileSdkVersion = 27 + compileSdkVersion = 28 targetSdkVersion = 26 supportLibVersion = "27.1.1" }