diff --git a/en/react-native-device-info.md b/en/react-native-device-info.md index 9b28e93874708d18988a0a64b8315d52827689bd..acabbf989a90ea5c6bcd3b0f3a7e9d49dca1e742 100644 --- a/en/react-native-device-info.md +++ b/en/react-native-device-info.md @@ -69,7 +69,7 @@ function App() { Brand: '', Model: '', DeviceType: '', - DeviceNameSync: '', + DeviceName: '', }); useEffect(() => { @@ -83,7 +83,7 @@ function App() { const Brand = await DeviceInfo.getBrand(); const Model = await DeviceInfo.getModel(); const DeviceType = await DeviceInfo.getDeviceType(); - const DeviceNameSync = await DeviceInfo.getDeviceNameSync(); + const DeviceName = await DeviceInfo.getDeviceName(); setDeviceInfo({ BundleId, @@ -95,7 +95,7 @@ function App() { Brand, Model, DeviceType, - DeviceNameSync, + DeviceName, }); }; @@ -130,7 +130,7 @@ function App() { Brand: {deviceInfo.Brand} Model: {deviceInfo.Model} DeviceType: {deviceInfo.DeviceType} - DeviceNameSync: {deviceInfo.DeviceNameSync} + DeviceName: {deviceInfo.DeviceName} @@ -288,7 +288,7 @@ Open `entry/src/main/module.json5`, add the following permission: | getDeviceType | TReturns the device's type as a string | string | No | IOS/Android/visionOS | yes | | getDisplay | A build ID string meant for displaying to the user. | Promise | No | Android | yes | | getDeviceName | Gets the device name. | Promise | No | IOS/Android/Windows/visionOS | yes | -| getDeviceNameSync | Gets the device name. | string | No | IOS/Android/Windows/visionOS | yes | +| getDeviceNameSync | Gets the device name. | string | No | No | No | | getDeviceToken | Gets the device token (see DeviceCheck). Only available for iOS 11.0+ on real devices. This will reject the promise when getDeviceToken is not supported, be careful with exception handling. | Promise | No | IOS/visionOS | no | | getFirstInstallTime | Gets the time at which the app was first installed, in milliseconds. | Promise | No | IOS/Android/Windows/visionOS | yes | | getFingerprint | A string that uniquely identifies this build. | Promise | No | Windows | no | @@ -336,7 +336,7 @@ Open `entry/src/main/module.json5`, add the following permission: | isAirplaneMode | Tells if the device is in Airplane Mode. | Promise | No | Android/ Web | yes | | isBatteryCharging | Tells if the battery is currently charging. | Promise | No | IOS/Android/Windows/Web/visionOS | yes | | isEmulator | Tells if the application is running in an emulator. | Promise | No | IOS/Android/Windows/visionOS | no | -| isKeyboardConnected | Tells if the device has a keyboard connected. | Promise | No | Windows | yes | +| isKeyboardConnected | Tells if the device has a keyboard connected. | Promise | No | Windows | partially(Only supports asynchronous retrieval) | | isLandscape | Tells if the device is currently in landscape mode. | Promise | No | IOS/Android/Windows/visionOs | yes | | isLocationEnabled | Allow access to user's location information | Promise | No | IOS/Android/Web/visionOS | yes | | isMouseConnected | Tells if the device has a mouse connected. | Promise | No | Windows | yes | diff --git a/zh-cn/react-native-device-info.md b/zh-cn/react-native-device-info.md index f7cf62bbb3bb8d2a8f869a577e1807bf7bf0f9ce..e0d2b73e77ae5a37557a37f063676b496053bea6 100644 --- a/zh-cn/react-native-device-info.md +++ b/zh-cn/react-native-device-info.md @@ -67,7 +67,7 @@ function App() { Brand: '', Model: '', DeviceType: '', - DeviceNameSync: '', + DeviceName: '', }); useEffect(() => { @@ -81,7 +81,7 @@ function App() { const Brand = await DeviceInfo.getBrand(); const Model = await DeviceInfo.getModel(); const DeviceType = await DeviceInfo.getDeviceType(); - const DeviceNameSync = await DeviceInfo.getDeviceNameSync(); + const DeviceName = await DeviceInfo.getDeviceName(); setDeviceInfo({ BundleId, @@ -93,7 +93,7 @@ function App() { Brand, Model, DeviceType, - DeviceNameSync, + DeviceName, }); }; @@ -128,7 +128,7 @@ function App() { Brand: {deviceInfo.Brand} Model: {deviceInfo.Model} DeviceType: {deviceInfo.DeviceType} - DeviceNameSync: {deviceInfo.DeviceNameSync} + DeviceName: {deviceInfo.DeviceName} @@ -287,7 +287,7 @@ ohpm install | getDeviceType | TReturns the device's type as a string | string | No | IOS/Android/visionOS | yes | | getDisplay | A build ID string meant for displaying to the user. | Promise | No | Android | yes | | getDeviceName | Gets the device name. | Promise | No | IOS/Android/Windows/visionOS | yes | -| getDeviceNameSync | Gets the device name. | string | No | IOS/Android/Windows/visionOS | yes | +| getDeviceNameSync | Gets the device name. | string | No | No | No | | getDeviceToken | Gets the device token (see DeviceCheck). Only available for iOS 11.0+ on real devices. This will reject the promise when getDeviceToken is not supported, be careful with exception handling. | Promise | No | IOS/visionOS | no | | getFirstInstallTime | Gets the time at which the app was first installed, in milliseconds. | Promise | No | IOS/Android/Windows/visionOS | yes | | getFingerprint | A string that uniquely identifies this build. | Promise | No | Windows | no | @@ -336,7 +336,7 @@ ohpm install | isAirplaneMode | Tells if the device is in Airplane Mode. | Promise | No | Android/ Web | yes | | isBatteryCharging | Tells if the battery is currently charging. | Promise | No | IOS/Android/Windows/Web/visionOS | yes | | isEmulator | Tells if the application is running in an emulator. | Promise | No | IOS/Android/Windows/visionOS | no | -| isKeyboardConnected | Tells if the device has a keyboard connected. | Promise | No | Windows | yes | +| isKeyboardConnected | Tells if the device has a keyboard connected. | Promise | No | Windows | partially(Only supports asynchronous retrieval) | | isLandscape | Tells if the device is currently in landscape mode. | Promise | No | IOS/Android/Windows/visionOs | yes | | isLocationEnabled | Allow access to user's location information | Promise | No | IOS/Android/Web/visionOS | yes | | isMouseConnected | Tells if the device has a mouse connected. | Promise | No | Windows | yes |