|
@@ -41,6 +41,11 @@ export default class Example extends Component {
|
41
|
41
|
}
|
42
|
42
|
}
|
43
|
43
|
|
|
44
|
+ _openSettings() {
|
|
45
|
+ return Permissions.openSettings()
|
|
46
|
+ .then(() => alert('back to app!!'))
|
|
47
|
+ }
|
|
48
|
+
|
44
|
49
|
_updatePermissions(types) {
|
45
|
50
|
Permissions.checkMultiplePermissions(types)
|
46
|
51
|
.then(status => {
|
|
@@ -71,7 +76,7 @@ export default class Example extends Component {
|
71
|
76
|
"There was a problem getting your permission. Please enable it from settings.",
|
72
|
77
|
[
|
73
|
78
|
{text: 'Cancel', style: 'cancel'},
|
74
|
|
- {text: 'Open Settings', onPress: Permissions.openSettings },
|
|
79
|
+ {text: 'Open Settings', onPress: this._openSettings.bind(this) },
|
75
|
80
|
]
|
76
|
81
|
)
|
77
|
82
|
}
|
|
@@ -111,7 +116,7 @@ export default class Example extends Component {
|
111
|
116
|
</TouchableHighlight>
|
112
|
117
|
|
113
|
118
|
<TouchableHighlight
|
114
|
|
- onPress={Permissions.openSettings}>
|
|
119
|
+ onPress={this._openSettings.bind(this)}>
|
115
|
120
|
<Text style={styles.text}>Open settings</Text>
|
116
|
121
|
</TouchableHighlight>
|
117
|
122
|
</View>
|