一、Platform 获取平台属性
console.log(Platform.OS)
console.log(Platform.Version)
console.log(Platform.constants)
console.log(Platform.isPad);
console.log(Platform.isTV);
const styles = StyleSheet.create({box: {width: '100%',height: '100%',...Platform.select({ android: {xx:xx},ios: {xx:xx},default: {xx:xx},})}
})
二、Linking
Linking.canOpenURL('xx')
Linking.openURL('xx')
Linking.openSettings()
Linking.getInitialURL()
三、PixelRatio
PixelRatio.get()
PixelRatio.getFontScale()
PixelRatio.getPixelSizeForLayoutSize(尺寸)
四、PermissionsAndroid 安装权限
PermissionsAndroid.check(xxxx).then(result => {if (!result) {PermissionsAndroid.request(xxxx).then(status => {});}
});PermissionsAndroid.requestMultiple([xxxx,xxxx])
