add feature to example
This commit is contained in:
parent
77495c4cb9
commit
13d39e0b85
|
@ -128,6 +128,7 @@ export default class KeychainExample extends Component {
|
|||
<Text style={styles.buttonText}>Save</Text>
|
||||
</View>
|
||||
</TouchableHighlight>
|
||||
|
||||
<TouchableHighlight
|
||||
onPress={() => this.load()}
|
||||
style={styles.button}
|
||||
|
@ -136,6 +137,7 @@ export default class KeychainExample extends Component {
|
|||
<Text style={styles.buttonText}>Load</Text>
|
||||
</View>
|
||||
</TouchableHighlight>
|
||||
|
||||
<TouchableHighlight
|
||||
onPress={() => this.reset()}
|
||||
style={styles.button}
|
||||
|
@ -144,6 +146,22 @@ export default class KeychainExample extends Component {
|
|||
<Text style={styles.buttonText}>Reset</Text>
|
||||
</View>
|
||||
</TouchableHighlight>
|
||||
|
||||
<TouchableHighlight
|
||||
onPress={async() => {
|
||||
if (Platform.OS !== 'android') {
|
||||
alert('android-only feature');
|
||||
return;
|
||||
}
|
||||
const level = await Keychain.getSecurityLevel();
|
||||
alert(level)
|
||||
}}
|
||||
style={styles.button}
|
||||
>
|
||||
<View style={styles.load}>
|
||||
<Text style={styles.buttonText}>Get security level</Text>
|
||||
</View>
|
||||
</TouchableHighlight>
|
||||
</View>
|
||||
</View>
|
||||
</KeyboardAvoidingView>
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue