Use Linking.openSettings() so it works on Android (#865)
parent
cae615769c
commit
9ac8c44a6a
|
@ -4,10 +4,6 @@ import {Linking} from 'react-native'
|
||||||
import {isWeb} from 'platform/detection'
|
import {isWeb} from 'platform/detection'
|
||||||
import {Alert} from 'view/com/util/Alert'
|
import {Alert} from 'view/com/util/Alert'
|
||||||
|
|
||||||
const openSettings = () => {
|
|
||||||
Linking.openURL('app-settings:')
|
|
||||||
}
|
|
||||||
|
|
||||||
const openPermissionAlert = (perm: string) => {
|
const openPermissionAlert = (perm: string) => {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'Permission needed',
|
'Permission needed',
|
||||||
|
@ -17,7 +13,7 @@ const openPermissionAlert = (perm: string) => {
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
style: 'cancel',
|
style: 'cancel',
|
||||||
},
|
},
|
||||||
{text: 'Open Settings', onPress: () => openSettings()},
|
{text: 'Open Settings', onPress: () => Linking.openSettings()},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue