From ff1b21b9666b91870412836108bef119cb9f9fe8 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Fri, 5 Sep 2025 12:02:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20[Issues:=20#ICWIVM]=20isKeyboardCon?= =?UTF-8?q?nected=E5=8F=AA=E6=94=AF=E6=8C=81=E5=BC=82=E6=AD=A5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-device-info.md | 2 +- zh-cn/react-native-device-info.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/en/react-native-device-info.md b/en/react-native-device-info.md index 9b28e938..9b0f792c 100644 --- a/en/react-native-device-info.md +++ b/en/react-native-device-info.md @@ -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 f7cf62bb..e557441f 100644 --- a/zh-cn/react-native-device-info.md +++ b/zh-cn/react-native-device-info.md @@ -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 | -- Gitee From 63f4b9471a99a3118706dae4a3ed4a8b7e116c33 Mon Sep 17 00:00:00 2001 From: chenwenhui133 <2984202073@qq.com> Date: Fri, 5 Sep 2025 20:05:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20[Issues:=20#ICWIVM]=20getDeviceName?= =?UTF-8?q?=E5=8F=AA=E6=94=AF=E6=8C=81=E5=BC=82=E6=AD=A5=E8=8E=B7=E5=8F=96?= =?UTF-8?q?,getDeviceNameSync=E4=B8=8D=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-device-info.md | 10 +++++----- zh-cn/react-native-device-info.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/en/react-native-device-info.md b/en/react-native-device-info.md index 9b0f792c..acabbf98 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 | diff --git a/zh-cn/react-native-device-info.md b/zh-cn/react-native-device-info.md index e557441f..e0d2b73e 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 | -- Gitee