diff --git a/en/react-native-blob-util.md b/en/react-native-blob-util.md index 14c6a8aeb7926b6b601203d8dfcc2de562bb5cff..9e5a3ec3b742dd1051f9a97bf915216ddaa7afaf 100644 --- a/en/react-native-blob-util.md +++ b/en/react-native-blob-util.md @@ -103,24 +103,25 @@ export default function BlobUtilDemo() { const writeArrayChunk = () => { ReactNativeBlobUtil.fs .writeStream(result + "/text.txt", "ascii", false) - .then((reactNativeBlobUtilWriteStream) => { - reactNativeBlobUtilWriteStream.encoding = "ascii"; - reactNativeBlobUtilWriteStream.write(["101", "32", "97"]); + .then((reactNativeBlobUtilWriteStream:any) => { + reactNativeBlobUtilWriteStream.write([101, 32, 97]); + reactNativeBlobUtilWriteStream.close(); }); }; const writeChunk = () => { ReactNativeBlobUtil.fs .writeStream(result + "/text.txt", "utf8", false) - .then((reactNativeBlobUtilWriteStream) => { + .then((reactNativeBlobUtilWriteStream:any) => { reactNativeBlobUtilWriteStream.write("Zm9vIChXcml0ZSBCYXNlNjQpMQ=="); + reactNativeBlobUtilWriteStream.close(); }); }; const closeStream = () => { ReactNativeBlobUtil.fs .writeStream(result + "/text.txt", "utf8", false) - .then((reactNativeBlobUtilWriteStream) => { + .then((reactNativeBlobUtilWriteStream:any) => { setTimeout(() => { reactNativeBlobUtilWriteStream.close(); }, 1000); @@ -206,7 +207,7 @@ export default function BlobUtilDemo() { BlobUtil - {result} + {result} @@ -366,8 +367,6 @@ const styles = StyleSheet.create({ fontWeight: "bold", textAlign: "center", fontSize: 16, - ellipsizeMode: "tail", - numberOfLines: 2, }, titleArea: { width: "90%", diff --git "a/en/react-native-blob-util\357\274\210nocodegen\357\274\211.md" "b/en/react-native-blob-util\357\274\210nocodegen\357\274\211.md" index 1a6583b08c147060540c15e74e52f69147f0cbb1..43bfd7d52166b4139d11f86ebcee83a0f55b1360 100644 --- "a/en/react-native-blob-util\357\274\210nocodegen\357\274\211.md" +++ "b/en/react-native-blob-util\357\274\210nocodegen\357\274\211.md" @@ -102,29 +102,31 @@ export default function BlobUtilDemo() { const writeArrayChunk = () => { ReactNativeBlobUtil.fs .writeStream(result + "/text.txt", "ascii", false) - .then((reactNativeBlobUtilWriteStream) => { - reactNativeBlobUtilWriteStream.encoding = "ascii"; - reactNativeBlobUtilWriteStream.write(["101", "32", "97"]); + .then((reactNativeBlobUtilWriteStream:any) => { + reactNativeBlobUtilWriteStream.write([101, 32, 97]); + reactNativeBlobUtilWriteStream.close(); }); }; const writeChunk = () => { ReactNativeBlobUtil.fs .writeStream(result + "/text.txt", "utf8", false) - .then((reactNativeBlobUtilWriteStream) => { + .then((reactNativeBlobUtilWriteStream:any) => { reactNativeBlobUtilWriteStream.write("Zm9vIChXcml0ZSBCYXNlNjQpMQ=="); + reactNativeBlobUtilWriteStream.close(); }); }; const closeStream = () => { ReactNativeBlobUtil.fs .writeStream(result + "/text.txt", "utf8", false) - .then((reactNativeBlobUtilWriteStream) => { + .then((reactNativeBlobUtilWriteStream:any) => { setTimeout(() => { reactNativeBlobUtilWriteStream.close(); }, 1000); }); }; + const readStream = () => { ReactNativeBlobUtil.fs.readStream(result + "/text.txt", "utf8", 4000, 200); }; @@ -205,7 +207,7 @@ export default function BlobUtilDemo() { BlobUtil - {result} + {result} @@ -365,8 +367,6 @@ const styles = StyleSheet.create({ fontWeight: "bold", textAlign: "center", fontSize: 16, - ellipsizeMode: "tail", - numberOfLines: 2, }, titleArea: { width: "90%", diff --git a/en/react-native-color-matrix-image-filters.md b/en/react-native-color-matrix-image-filters.md index 127725cd772f25c377a6e9acb677ab434b79eff4..df8fea1c84a5a7fdd8a0bdd263d4a7f87adec015 100644 --- a/en/react-native-color-matrix-image-filters.md +++ b/en/react-native-color-matrix-image-filters.md @@ -48,7 +48,7 @@ import { Achromatopsia, Brightness } from 'react-native-color-matrix-image-filters'; - +import React from 'react'; import { View, StyleSheet, Image } from 'react-native'; export const ColorMatrixImageFiltersTest = () => { diff --git a/en/react-native-community-blur.md b/en/react-native-community-blur.md index a312c6dce5a06a62ea2ce2bf60c39f5e802dd1b2..f1747073f4529b77dbbd5f8022937ae52031ec05 100644 --- a/en/react-native-community-blur.md +++ b/en/react-native-community-blur.md @@ -16,7 +16,7 @@ ## Installation and Usage -本库已经适配`C-API版本`从版本`4.4.0-0.1.0`开始的版本为`C-API版本`,`C-API版本`在性能和速度上都优于`ArkTS版本`。 +This library has been adapted to C-API versions starting from version 4.4.0-0.1.0. The C-API versions offer better performance and speed compared to the ArkTS versions. Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-community-blur Releases](https://github.com/react-native-oh-library/react-native-blur/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. @@ -121,7 +121,7 @@ export const Blurs = () => { export const BlurDemo = () => { const [showBlurs, setShowBlurs] = React.useState(false); - //'../assets/bgimage.jpeg' 此路径的图片为本地图片,在使用demo时将此图片的路径换为自己本地图片路径 + //'../assets/bgimage.jpeg' This path refers to a local image. When using the demo, replace this image path with your own local image path. return ( > PackageProvider::getPackages(Package::Cont } ``` -### 4.Introducing BlurView Component to ArkTS (使用4.4.0-0.1.0及之后的版本忽略这步配置) +### 4.Introducing BlurView Component to ArkTS (Skip this configuration step when using version 4.4.0-0.1.0 or later.) Find `function buildCustomRNComponent()`, which is usually located in `entry/src/main/ets/pages/index.ets` or `entry/src/main/ets/rn/LoadBundle.ets`, and add the following code: @@ -370,7 +370,7 @@ Check the release version information in the release address of the third-party #### blurType -> [!TIP] 如果要使用自适应模糊效果需要配置深色模式[配置文档](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-light-dark-color-adaptation-V5#section1421172621111)如果不配置深色模式则自适应模糊效果将没有深色模式,只有浅色模式。 +> [!TIP] To use the adaptive blur effect, you need to configure dark mode. [Configuration Document](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ui-dark-light-color-adaptation)If dark mode is not configured, the adaptive blur effect will not support dark mode and will only work in light mode. | Name | Description | Platform | HarmonyOS Support | | ------------------------ | ------------------------------------------------------------------------------------------------------ |-----------------------| ----------------- | @@ -409,8 +409,8 @@ Check the release version information in the release address of the third-party ## Known Issues -- [ ] @react-native-community/blur的 VibrancyView组件未实现HarmonyOS化 [issue#7](https://github.com/react-native-oh-library/react-native-blur/issues/7) -- [ ] @react-native-community/blur的reducedTransparencyFallbackColor属性未实现 HarmonyOS化[issue#8](https://github.com/react-native-oh-library/react-native-blur/issues/8) +- [ ] The VibrancyView component from @react-native-community/blur has not been adapted for HarmonyOS. [issue#7](https://github.com/react-native-oh-library/react-native-blur/issues/7) +- [ ] The reducedTransparencyFallbackColor property of @react-native-community/blur has not been adapted for HarmonyOS.[issue#8](https://github.com/react-native-oh-library/react-native-blur/issues/8) ## Others diff --git a/en/react-native-device-info.md b/en/react-native-device-info.md index f43cc72fe76b7a116ecf8a2ae3cab1276c3f26e0..9b28e93874708d18988a0a64b8315d52827689bd 100644 --- a/en/react-native-device-info.md +++ b/en/react-native-device-info.md @@ -44,17 +44,113 @@ The following code shows the basic use scenario of the repository: ```js +import { + SafeAreaView, + ScrollView, + StatusBar, + StyleSheet, + Text, + useColorScheme, + View, +} from 'react-native'; +import React, { useState, useEffect } from 'react'; import DeviceInfo from 'react-native-device-info'; - DeviceInfo.getBundleId(); - DeviceInfo.getVersion(); - DeviceInfo.getReadableVersion(); - DeviceInfo.getBuildNumber(); - DeviceInfo.isTablet(); - DeviceInfo.getApplicationName(); - DeviceInfo.getBrand(); - DeviceInfo.getModel(); - DeviceInfo.getDeviceType(); - DeviceInfo.getDeviceNameSync(); +import { Colors } from 'react-native/Libraries/NewAppScreen'; + +function App() { + const isDarkMode = useColorScheme() === 'dark'; + const [deviceInfo, setDeviceInfo] = useState({ + BundleId: '', + Version: '', + ReadableVersion: '', + BuildNumber: '', + Tablet: false, + ApplicationName: '', + Brand: '', + Model: '', + DeviceType: '', + DeviceNameSync: '', + }); + + useEffect(() => { + const fetchDeviceInfo = async () => { + const BundleId = await DeviceInfo.getBundleId(); + const Version = await DeviceInfo.getVersion(); + const ReadableVersion = await DeviceInfo.getReadableVersion(); + const BuildNumber = await DeviceInfo.getBuildNumber(); + const Tablet = await DeviceInfo.isTablet(); + const ApplicationName = await DeviceInfo.getApplicationName(); + const Brand = await DeviceInfo.getBrand(); + const Model = await DeviceInfo.getModel(); + const DeviceType = await DeviceInfo.getDeviceType(); + const DeviceNameSync = await DeviceInfo.getDeviceNameSync(); + + setDeviceInfo({ + BundleId, + Version, + ReadableVersion, + BuildNumber, + Tablet, + ApplicationName, + Brand, + Model, + DeviceType, + DeviceNameSync, + }); + }; + + fetchDeviceInfo(); + }, []); + + const backgroundStyle = { + backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, + }; + + return ( + + + + + Device Information + BundleId: {deviceInfo.BundleId} + Version: {deviceInfo.Version} + ReadableVersion: {deviceInfo.ReadableVersion} + BuildNumber: {deviceInfo.BuildNumber} + Tablet: {deviceInfo.Tablet ? 'Yes' : 'No'} + ApplicationName: {deviceInfo.ApplicationName} + Brand: {deviceInfo.Brand} + Model: {deviceInfo.Model} + DeviceType: {deviceInfo.DeviceType} + DeviceNameSync: {deviceInfo.DeviceNameSync} + + + + ); +} + +const styles = StyleSheet.create({ + sectionTitle: { + fontSize: 24, + fontWeight: 'bold', + marginBottom: 16, + }, + infoText: { + fontSize: 16, + marginBottom: 8, + }, +}); + +export default App; + ``` ## Use Codegen @@ -173,90 +269,90 @@ Open `entry/src/main/module.json5`, add the following permission: | Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| getAndroidId |Gets the ANDROID_ID. See API documentation for appropriate use. | Promise| yes | Android | no | -| getApiLevel | Gets the API level. | Promise| yes | Android | yes | -| getApplicationName | Gets the application name. | string | yes | IOS/Android/Windows/visionOS | yes | -| getAvailableLocationProviders | Returns an object of platform-specfic location providers/servcies, with value whether or not they are currently available.boolean | Promise | yes | IOS/Android/visionOS | yes | -| getBaseOs | The base OS build the product is based on. | Promise | yes | Android/Windows/Web | yes | -| getBuildId | Gets build number of the operating system. | Promise | yes | IOS/Android/Windows/visionOS | yes | -| getBatteryLevel | Gets the battery level of the device as a float comprised between 0 and 1. | Promise | yes | IOS/Android /Windows/Web/visionOS | yes | -| getBootloader | The system bootloader version number. | Promise | yes | Android | yes | -| getBrand | Gets the device brand. | string | yes | IOS/Android/Windows/visionOS | yes | -| getBuildNumber | Gets the application build number. | string | yes | IOS/Android/Windows/visionOS | yes | -| getBundleId | Gets the application bundle identifier. | string | yes | IOS/Android/Windows/visionOS | yes | -| isCameraPresent | Tells if the device has any camera now. | Promise | yes | Android/Windows/Web | yes | -| getCarrier | Gets the carrier name (network operator). | Promise | yes | IOS/Android | yes | -| getCodename | The current development codename, or the string "REL" if this is a release build. | Promise | yes | Android | yes | -| getDevice | The name of the industrial design. | Promise | yes | Android | yes | -| getDeviceId |Gets the device ID. | string | yes | IOS/Android/Windows/visionOS | no | -| getDeviceType | TReturns the device's type as a string | string | yes | IOS/Android/visionOS | yes | -| getDisplay | A build ID string meant for displaying to the user. | Promise | yes | Android | yes | -| getDeviceName | Gets the device name. | Promise | yes | IOS/Android/Windows/visionOS | yes | -| getDeviceNameSync | Gets the device name. | string | yes | IOS/Android/Windows/visionOS | yes | -| 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 | yes | IOS/visionOS | no | -| getFirstInstallTime | Gets the time at which the app was first installed, in milliseconds. | Promise | yes | IOS/Android/Windows/visionOS | yes | -| getFingerprint | A string that uniquely identifies this build. | Promise | yes | Windows | no | -| getFontScale | Gets the device font scale. The font scale is the ratio of the current system font to the "normal" font size, so if normal text is 10pt and the system font is currently 15pt, the font scale would be 1.5 This can be used to determine if accessability settings has been changed for the device; you may want to re-layout certain views if the font scale is significantly larger ( > 2.0 ) | Promise | yes | IOS/Android/Windows | yes | -| getFreeDiskStorage | Method that gets available storage size, in bytes, taking into account both root and data file systems calculation. | Promise | yes | IOS/Android/Windows/Web/visionOS | no | -| getFreeDiskStorageOld | Old implementation of method that gets available storage size, in bytes. | Promise | yes | IOS/Android/Windows/Web/visionOS | no | -| getHardware | The name of the hardware (from the kernel command line or /proc). | Promise | yes | Android | yes | -| getHost | Hostname | Promise | yes | Android/Windows | yes| -| getHostNames | Hostnames | Promise | yes | Windows | no | -| getIpAddress | Deprecated Gets the device current IP address. (of wifi only) Switch to react-native-netinfo/netinfo or react-native-network-info | Promise | yes | IOS/Android/Windows/visionOS | yes | -| getIncremental | The internal value used by the underlying source control to represent this build. | Promise | yes | Android | yes | -| getInstallerPackageName | The internal value used by the underlying source control to represent this build. | Promise | yes | IOS/Android/Windows/visoinOS | yes | -| getInstallReferrer | Gets the referrer string upon application installation. | Promise | yes | Android/Windows/Web | no | -| getInstanceId | Gets the application instance ID. | Promise | yes | Android | yes| -| getLastUpdateTime | Gets the time at which the app was last updated, in milliseconds. | Promise | yes | Android | yes | -| getMacAddress | Gets the network adapter MAC address. | Promise | yes | IOS/Android/visionOS | no | -| getManufacturer | Gets the device manufacturer. | Promise | yes | IOS/Android/visoinOS | yes | -| getMaxMemory | Returns the maximum amount of memory that the VM will attempt to use, in bytes. | Promise | yes | Android/Windows/Web | no | -| getModel | Gets the device model. | string | yes | IOS/Android | yes | -| getPowerState | Gets the power state of the device including the battery level, whether it is plugged in, and if the system is currently operating in low power mode. | Promise | yes | IOS/Android/Windows/Web/visionOS | yes | -| getProduct | The name of the overall product. | Promise | yes | Android | yes | -| getPreviewSdkInt | The developer preview revision of a prerelease SDK. | Promise | yes | Android | no | -| getReadableVersion | Gets the application human readable version (same as getVersion() + '.' + getBuildNumber()) | string | yes | IOS/Android/Windows/visionOS | yes | -| getSerialNumber | Gets the device serial number. Will be 'unknown' in almost all cases unless you have a privileged app and you know what you're doing. | Promise | yes | Android/Windows | no | -| getSecurityPatch | The user-visible security patch level. | Promise | yes | Android | yes | -| getSystemAvailableFeatures | Returns a list of available system features on Android. | Promise | yes | Android | no | -| getSystemName | Gets the device OS name. | string | yes | IOS/Android/Windows/visoinOS | yes | -| getSystemVersion | Gets the device OS version. | string | yes | IOS/Android/Windows/visoinOS | yes | -| getTags | Comma-separated tags describing the build. | Promise | yes | Android | no | -| getType | The type of build. | Promise | yes | Android | yes | -| getTotalDiskCapacity | Method that gets full disk storage size, in bytes, taking into account both root and data file systems calculation. | Promise | yes | Android | no | -| getTotalDiskCapacityOld | Old implementation of method that gets full disk storage size, in bytes. | Promise | yes | Android | no | -| getTotalMemory | Gets the device total memory, in bytes. | Promise | yes | IOS/Android/Web/visionOS | no | -| getUniqueId | Gets the device unique ID. On Android it is currently identical to in this module. | Promise | yes | IOS/Android/Windows/visionOS | no | -| getUsedMemory | Gets the app memory usage, in bytes. | Promise | yes | IOS/Android/Windows/Web/visionOs | yes | -| getUserAgent | Gets the device User Agent. | Promise | yes | IOS/Android/Web/visionOs | no | -| getUserAgentSync | Gets the device User Agent. | string | yes | Android/Web | no | -| getVersion | Gets the application version. Take into account that a version string is device/OS formatted and can contain any additional data (such as build number etc.). If you want to be sure about version format, you can use a regular expression to get the desired portion of the returned version string. | string | yes | IOS/Android/Windows/visionOS | yes | -| getBrightness | Gets the current brightness level of the device's main screen. Currently iOS only. Returns a number between 0.0 and 1.0, inclusive. | Promise | yes | IOS | no | -| hasGms | Tells if the device supports Google Mobile Services. | Promise | yes | Android | yes | -| hasHms | Tells if the device supports Huawei Mobile Services. | Promise | yes | Android | yes | -| hasNotch | Tells if the device has a notch. | boolean | yes | IOS/Android/Windows/visionOS | no | -| hasDynamicIsland | Tells if the device has a dynamic island. | boolean | yes | IOS/Android/Windows/visionOS | no | -| hasSystemFeature | Tells if the device has a specific system feature. | Promise | yes | Android | no | -| isAirplaneMode | Tells if the device is in Airplane Mode. | Promise | yes | Android/ Web | yes | -| isBatteryCharging | Tells if the battery is currently charging. | Promise | yes | IOS/Android/Windows/Web/visionOS | yes | -| isEmulator | Tells if the application is running in an emulator. | Promise | yes | IOS/Android/Windows/visionOS | no | -| isKeyboardConnected | Tells if the device has a keyboard connected. | Promise | yes | Windows | yes | -| isLandscape | Tells if the device is currently in landscape mode. | Promise | yes | IOS/Android/Windows/visionOs | yes | -| isLocationEnabled | Allow access to user's location information | Promise | yes | IOS/Android/Web/visionOS | yes | -| isMouseConnected | Tells if the device has a mouse connected. | Promise | yes | Windows | yes | -| isHeadphonesConnected | Tells if the device has a Headphones connected. | Promise | yes | IOS/Android/visionOS | yes | -| isWiredHeadphonesConnected | Tells if the device has a WiredHeadphones connected. | Promise | yes | IOS/Android/visionOS | yes | -| isBluetoothHeadphonesConnected | Tells if the device has a BluetoothHeadphones connected. | Promise | yes | IOS/Android/visionOS | yes | -| isPinOrFingerprintSet | Tells if a PIN number or a fingerprint was set for the device. | Promise | yes | IOS/Android/Windows/visoinOs | yes | -| isTablet | Tells if the device is a tablet. | boolean | yes | IOS/Android/Windows/visoinOs | yes | -| isLowRamDevice | Tells if the device has low RAM. | boolean | yes | Android | yes | -| isDisplayZoomed | Tells if the user changed Display Zoom to Zoomed | boolean | yes | IOS | no | -| isTabletMode | Tells if the device is in tablet mode. | Promise | yes | Windows | no | -| supported32BitAbis | device support 32 Abis | Promise | yes | Windows | yes | -| supported64BitAbis | device support 64 Abis | Promise | yes | Windows | yes | -| supportedAbis | device support Abis | Promise | yes | IOS/Android/Windows/visoinOS | yes| -| syncUniqueId | This method is intended for iOS,This synchronizes uniqueId with IDFV or sets new a random string,On iOS it uses the DeviceUID uid identifier. On other platforms it just call getUniqueId() in this module. | Promise | yes | IOS/visionOS | no | -| getSupportedMediaTypeList | This method gets the list of supported media codecs. | Promise | yes | IOS/Android | yes | +| getAndroidId |Gets the ANDROID_ID. See API documentation for appropriate use. | Promise| No | Android | no | +| getApiLevel | Gets the API level. | Promise| No | Android | yes | +| getApplicationName | Gets the application name. | string | No | IOS/Android/Windows/visionOS | yes | +| getAvailableLocationProviders | Returns an object of platform-specfic location providers/servcies, with value whether or not they are currently available.boolean | Promise | No | IOS/Android/visionOS | yes | +| getBaseOs | The base OS build the product is based on. | Promise | No | Android/Windows/Web | yes | +| getBuildId | Gets build number of the operating system. | Promise | No | IOS/Android/Windows/visionOS | yes | +| getBatteryLevel | Gets the battery level of the device as a float comprised between 0 and 1. | Promise | No | IOS/Android /Windows/Web/visionOS | yes | +| getBootloader | The system bootloader version number. | Promise | No | Android | yes | +| getBrand | Gets the device brand. | string | No | IOS/Android/Windows/visionOS | yes | +| getBuildNumber | Gets the application build number. | string | No | IOS/Android/Windows/visionOS | yes | +| getBundleId | Gets the application bundle identifier. | string | No | IOS/Android/Windows/visionOS | yes | +| isCameraPresent | Tells if the device has any camera now. | Promise | No | Android/Windows/Web | yes | +| getCarrier | Gets the carrier name (network operator). | Promise | No | IOS/Android | yes | +| getCodename | The current development codename, or the string "REL" if this is a release build. | Promise | No | Android | yes | +| getDevice | The name of the industrial design. | Promise | No | Android | yes | +| getDeviceId |Gets the device ID. | string | No | IOS/Android/Windows/visionOS | no | +| 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 | +| 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 | +| getFontScale | Gets the device font scale. The font scale is the ratio of the current system font to the "normal" font size, so if normal text is 10pt and the system font is currently 15pt, the font scale would be 1.5 This can be used to determine if accessability settings has been changed for the device; you may want to re-layout certain views if the font scale is significantly larger ( > 2.0 ) | Promise | No | IOS/Android/Windows | yes | +| getFreeDiskStorage | Method that gets available storage size, in bytes, taking into account both root and data file systems calculation. | Promise | No | IOS/Android/Windows/Web/visionOS | no | +| getFreeDiskStorageOld | Old implementation of method that gets available storage size, in bytes. | Promise | No | IOS/Android/Windows/Web/visionOS | no | +| getHardware | The name of the hardware (from the kernel command line or /proc). | Promise | No | Android | yes | +| getHost | Hostname | Promise | No | Android/Windows | yes| +| getHostNames | Hostnames | Promise | No | Windows | no | +| getIpAddress | Deprecated Gets the device current IP address. (of wifi only) Switch to react-native-netinfo/netinfo or react-native-network-info | Promise | No | IOS/Android/Windows/visionOS | yes | +| getIncremental | The internal value used by the underlying source control to represent this build. | Promise | No | Android | yes | +| getInstallerPackageName | The internal value used by the underlying source control to represent this build. | Promise | No | IOS/Android/Windows/visoinOS | yes | +| getInstallReferrer | Gets the referrer string upon application installation. | Promise | No | Android/Windows/Web | no | +| getInstanceId | Gets the application instance ID. | Promise | No | Android | yes| +| getLastUpdateTime | Gets the time at which the app was last updated, in milliseconds. | Promise | No | Android | yes | +| getMacAddress | Gets the network adapter MAC address. | Promise | No | IOS/Android/visionOS | no | +| getManufacturer | Gets the device manufacturer. | Promise | No | IOS/Android/visoinOS | yes | +| getMaxMemory | Returns the maximum amount of memory that the VM will attempt to use, in bytes. | Promise | No | Android/Windows/Web | no | +| getModel | Gets the device model. | string | No | IOS/Android | yes | +| getPowerState | Gets the power state of the device including the battery level, whether it is plugged in, and if the system is currently operating in low power mode. | Promise | No | IOS/Android/Windows/Web/visionOS | yes | +| getProduct | The name of the overall product. | Promise | No | Android | yes | +| getPreviewSdkInt | The developer preview revision of a prerelease SDK. | Promise | No | Android | no | +| getReadableVersion | Gets the application human readable version (same as getVersion() + '.' + getBuildNumber()) | string | No | IOS/Android/Windows/visionOS | yes | +| getSerialNumber | Gets the device serial number. Will be 'unknown' in almost all cases unless you have a privileged app and you know what you're doing. | Promise | No | Android/Windows | no | +| getSecurityPatch | The user-visible security patch level. | Promise | No | Android | yes | +| getSystemAvailableFeatures | Returns a list of available system features on Android. | Promise | No | Android | no | +| getSystemName | Gets the device OS name. | string | No | IOS/Android/Windows/visoinOS | yes | +| getSystemVersion | Gets the device OS version. | string | No | IOS/Android/Windows/visoinOS | yes | +| getTags | Comma-separated tags describing the build. | Promise | No | Android | no | +| getType | The type of build. | Promise | No | Android | yes | +| getTotalDiskCapacity | Method that gets full disk storage size, in bytes, taking into account both root and data file systems calculation. | Promise | No | Android | no | +| getTotalDiskCapacityOld | Old implementation of method that gets full disk storage size, in bytes. | Promise | No | Android | no | +| getTotalMemory | Gets the device total memory, in bytes. | Promise | No | IOS/Android/Web/visionOS | no | +| getUniqueId | Gets the device unique ID. On Android it is currently identical to in this module. | Promise | No | IOS/Android/Windows/visionOS | no | +| getUsedMemory | Gets the app memory usage, in bytes. | Promise | No | IOS/Android/Windows/Web/visionOs | yes | +| getUserAgent | Gets the device User Agent. | Promise | No | IOS/Android/Web/visionOs | no | +| getUserAgentSync | Gets the device User Agent. | string | No | Android/Web | no | +| getVersion | Gets the application version. Take into account that a version string is device/OS formatted and can contain any additional data (such as build number etc.). If you want to be sure about version format, you can use a regular expression to get the desired portion of the returned version string. | string | No | IOS/Android/Windows/visionOS | yes | +| getBrightness | Gets the current brightness level of the device's main screen. Currently iOS only. Returns a number between 0.0 and 1.0, inclusive. | Promise | No | IOS | no | +| hasGms | Tells if the device supports Google Mobile Services. | Promise | No | Android | yes | +| hasHms | Tells if the device supports Huawei Mobile Services. | Promise | No | Android | yes | +| hasNotch | Tells if the device has a notch. | boolean | No | IOS/Android/Windows/visionOS | no | +| hasDynamicIsland | Tells if the device has a dynamic island. | boolean | No | IOS/Android/Windows/visionOS | no | +| hasSystemFeature | Tells if the device has a specific system feature. | Promise | No | Android | no | +| 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 | +| 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 | +| isHeadphonesConnected | Tells if the device has a Headphones connected. | Promise | No | IOS/Android/visionOS | yes | +| isWiredHeadphonesConnected | Tells if the device has a WiredHeadphones connected. | Promise | No | IOS/Android/visionOS | yes | +| isBluetoothHeadphonesConnected | Tells if the device has a BluetoothHeadphones connected. | Promise | No | IOS/Android/visionOS | yes | +| isPinOrFingerprintSet | Tells if a PIN number or a fingerprint was set for the device. | Promise | No | IOS/Android/Windows/visoinOs | yes | +| isTablet | Tells if the device is a tablet. | boolean | No | IOS/Android/Windows/visoinOs | yes | +| isLowRamDevice | Tells if the device has low RAM. | boolean | No | Android | yes | +| isDisplayZoomed | Tells if the user changed Display Zoom to Zoomed | boolean | No | IOS | no | +| isTabletMode | Tells if the device is in tablet mode. | Promise | No | Windows | no | +| supported32BitAbis | device support 32 Abis | Promise | No | Windows | yes | +| supported64BitAbis | device support 64 Abis | Promise | No | Windows | yes | +| supportedAbis | device support Abis | Promise | No | IOS/Android/Windows/visoinOS | yes| +| syncUniqueId | This method is intended for iOS,This synchronizes uniqueId with IDFV or sets new a random string,On iOS it uses the DeviceUID uid identifier. On other platforms it just call getUniqueId() in this module. | Promise | No | IOS/visionOS | no | +| getSupportedMediaTypeList | This method gets the list of supported media codecs. | Promise | No | IOS/Android | yes | ## Known Issues diff --git a/en/react-native-image-crop-picker(nocodegen).md b/en/react-native-image-crop-picker(nocodegen).md index 626ea36df28304a47a79445d2b917267c56c73c0..1e3cfcec86a1a2a144e29baba00bdd26a0591e21 100644 --- a/en/react-native-image-crop-picker(nocodegen).md +++ b/en/react-native-image-crop-picker(nocodegen).md @@ -34,7 +34,7 @@ npm install @react-native-oh-tpl/react-native-image-crop-picker@file:# yarn add @react-native-oh-tpl/react-native-image-crop-picker@file:# ``` -The usage scenario is the same [react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-crop-picker.md#yarn) +The usage scenario is the same [react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-crop-picker.md#yarn) ## Link @@ -276,15 +276,15 @@ Check the release version information in the release address of the third-party ## API -[react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-crop-picker.md#api) +[react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-crop-picker.md#api) ## Properties -[react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-crop-picker.md#%E5%B1%9E%E6%80%A7) +[react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-crop-picker.md#%E5%B1%9E%E6%80%A7) ## Known Issues -[react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-crop-picker.md#%E9%81%97%E7%95%99%E9%97%AE%E9%A2%98) +[react-native-image-crop-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-crop-picker.md#%E9%81%97%E7%95%99%E9%97%AE%E9%A2%98) ## Others diff --git a/en/react-native-image-crop-picker.md b/en/react-native-image-crop-picker.md index c9fe55e5c3fa68a985aa3a7759c0fa31b44ca3e2..78839adb3bb08e39283a4337c16867939835db71 100644 --- a/en/react-native-image-crop-picker.md +++ b/en/react-native-image-crop-picker.md @@ -45,744 +45,744 @@ import React from 'react'; import { Text, StyleSheet, TextInput, View, Button, ScrollView, Switch } from 'react-native'; const ImageCropPickDemo = () => { - const TAG: string = 'ImageCropPickerTurboModule'; - const [maxFiles, setMaxFiles] = React.useState(''); - const [imageQuality, setImageQuality] = React.useState(''); - const [imagePath, setImagePath] = React.useState(''); - const [clearImagePath, setClearImagePath] = React.useState(''); - const [cropperTitle, setCropperTitle] = React.useState(''); - const [chooseText, setChooseText] = React.useState(''); - const [chooseColor, setChooseColor] = React.useState(''); - const [cancelText, setCancelText] = React.useState(''); - const [cancelColor, setCancelColor] = React.useState(''); - const [cropperRotate, setCropperRotate] = React.useState(false); - const [showCropGuidelines, setShowCropGuidelines] = React.useState(true); - const [showCropFrame, setShowCropFrame] = React.useState(true); - const [multiple, setMultiple] = React.useState(false); - const [includeExif, setIncludeExif] = React.useState(false); - const [avoidEmptySpace, setAvoidEmptySpace] = React.useState(false); - const [writeTempFile, setTempFile] = React.useState(true); - const [includeBase64, setBase64] = React.useState(false); - const [freeStyleCropEnabled, setFreeStyleCropEnabled] = React.useState(false); - const [forceJpg, setForceJpg] = React.useState(false); - const [showsSelectedCount, setShowsSelectedCount] = React.useState(true); - const [selectedButton, setSelectedButton] = React.useState('any'); - const [useFrontCamera, setUseFrontCamera] = React.useState(false); - const [croppingCamera, setCroppingCamera] = React.useState(false); - const [writeTempFileCamera, setTempFileCamera] = React.useState(true); - const [includeBase64Camera, setBase64Camera] = React.useState(false); - const [includeExifCamera, setIncludeExifCamera] = React.useState(false); - const [avoidEmptySpaceCamera, setAvoidEmptySpaceCamera] = React.useState(false); - const [freeStyleCropEnabledCamera, setFreeStyleCropEnabledCamera] = React.useState(false); - const [forceJpgCamera, setForceJpgCamera] = React.useState(false); - const [mediaTypeCamera, setMediaTypeCamera] = React.useState('any'); - const [imageQualityCamera, setImageQualityCamera] = React.useState(''); - const [cropperTitleCamera, setCropperTitleCamera] = React.useState(''); - const [chooseTextCamera, setChooseTextCamera] = React.useState(''); - const [chooseColorCamera, setChooseColorCamera] = React.useState(''); - const [cancelTextCamera, setCancelTextCamera] = React.useState(''); - const [cancelColorCamera, setCancelColorCamera] = React.useState(''); - const [cropperRotateCamera, setCropperRotateCamera] = React.useState(false); - const [showCropGuidelinesCamera, setShowCropGuidelinesCamera] = React.useState(true); - const [showCropFrameCamera, setShowCropFrameCamera] = React.useState(true); - const [writeTempFileCropper, setTempFileCropper] = React.useState(true); - const [forceJpgCropper, setForceJpgCropper] = React.useState(false); - const [includeBase64Cropper, setBase64Cropper] = React.useState(false); - const [includeExifCropper, setIncludeExifCropper] = React.useState(false); - const [avoidEmptySpaceCropper, setAvoidEmptySpaceCropper] = React.useState(false); - const [freeStyleCropEnabledCropper, setFreeStyleCropEnabledCropper] = React.useState(false); - const [imageQualityCropper, setimageQualityCropper] = React.useState(''); - - const handleButtonPress = (buttonName) => { - setSelectedButton(buttonName); - }; - - const handleMediaType = (buttonName) => { - setMediaTypeCamera(buttonName); - }; - - return ( - - Camera, Gallery, Cropping Functionality - - - - - multiple: - + + + + + + + + + + + + + + + + + + + ) +} +export default App; ``` ## 2. Manual Link diff --git a/en/react-native-simple-toast.md b/en/react-native-simple-toast.md index 8aaff5bf8156d2414ccda188c23b69ea53730549..2539f1f51a000d51c6753bb501325389704856eb 100644 --- a/en/react-native-simple-toast.md +++ b/en/react-native-simple-toast.md @@ -57,9 +57,10 @@ import { import Toast from 'react-native-simple-toast'; import { useState } from 'react'; -export default function App() { - const [modalVisible, setModalVisible] = useState(false); + +const ToastTest = () => { + const [modalVisible, setModalVisible] = useState(false); return ( <> - -