mirror of
https://github.com/status-im/react-native-keychain.git
synced 2025-02-26 03:45:30 +00:00
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>
|
<Text style={styles.buttonText}>Save</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableHighlight>
|
</TouchableHighlight>
|
||||||
|
|
||||||
<TouchableHighlight
|
<TouchableHighlight
|
||||||
onPress={() => this.load()}
|
onPress={() => this.load()}
|
||||||
style={styles.button}
|
style={styles.button}
|
||||||
@ -136,6 +137,7 @@ export default class KeychainExample extends Component {
|
|||||||
<Text style={styles.buttonText}>Load</Text>
|
<Text style={styles.buttonText}>Load</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableHighlight>
|
</TouchableHighlight>
|
||||||
|
|
||||||
<TouchableHighlight
|
<TouchableHighlight
|
||||||
onPress={() => this.reset()}
|
onPress={() => this.reset()}
|
||||||
style={styles.button}
|
style={styles.button}
|
||||||
@ -144,6 +146,22 @@ export default class KeychainExample extends Component {
|
|||||||
<Text style={styles.buttonText}>Reset</Text>
|
<Text style={styles.buttonText}>Reset</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableHighlight>
|
</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>
|
||||||
</View>
|
</View>
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "27.0.3"
|
buildToolsVersion = "28.0.0"
|
||||||
minSdkVersion = 16
|
minSdkVersion = 16
|
||||||
compileSdkVersion = 27
|
compileSdkVersion = 28
|
||||||
targetSdkVersion = 26
|
targetSdkVersion = 26
|
||||||
supportLibVersion = "27.1.1"
|
supportLibVersion = "27.1.1"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user