- release: promoted release from 3.0.0-rc.5 without change
- fix: various fixes similar to / prompted by #771 / #768 / #769
- fix: getSystemName() returns value on ios+android #771 thanks @cmpayc!
- fix: getUniqueId() only returned value 1st call #768 thanks @tamhv!
- fix: getModel() not working on iOS #769 Thanks @rnnyrk!
- feat: memoize static return values for performance
- fix: TypeScript getPowerState() return type was Object instaed of PowerState interface
- fix: TypeScript definition file was missing getPhoneNumberSync()
- Added a sync version of each API call, in practice it is very difficult to consume async APIs during app bootstrap and device info is frequently fundamental to app startup behavior. This still preserves the change away from paying the entire cost of information retrieval at startup - now you will only pay for exactly what you need.
- fix incorrect use of macos for API selection vs ios in rc.3, rendering ios builds mostly useless
- verified last of the v2->v3 discrepancies, this is a release candidate now
- fix some real android device v2->v3 discrepancies
- BREAKING CHANGE: more capitalization changes for API calls to standardize (see below)
- BREAKING CHANGE: more return value changes to standardize return values (see below)
- feat: you no longer have to be careful with platform-specific APIs, all APIs will work, just returning standard "unknown" return values (see above breaking change, and example App.js usage)
- fix all emulator/simulator v2->v3 discrepancies
Each BREAKING CHANGE contains the required information to migrate. The example App.js shows sample usage.
- BREAKING CHANGE: Every API call returns a Promise now (and thus no more Android constructor with async boolean argument)
- This was required to improve module load speed, handle dynamic values, and release the main queue for iOS
- BREAKING CHANGE: Every API call with acronyms ('getIP', 'getABI' etc follows pure camel-case now, e.g. 'getIp', 'getAbi')
- This naming style is a consensus standard. Previously APIs here were half one way half the other. Now they are consistent
- isAirPlaneMode -> isAirplaneMode
- getIPAddress -> getIpAddress
- getMACAddress -> getMACAddress
- getAPILevel -> GetApiLevel
- getBaseOS -> getBaseOs
- getInstanceID -> getInstanceId
- getUniqueID -> getUniqueId
- supportedABIs -> supportedAbis
- BREAKING CHANGE: all events prefixed with 'RNDeviceInfo_' (react-native-device-info#620)
- This is required as event names are a global namespace and collisions are inevitable otherwise
- powerStateDidChange -> RNDeviceInfo_powerStateDidChange
- batteryLevelDidChange -> RNDeviceInfo_batteryLevelDidChange
- batteryLevelIsLow -> RNDeviceInfo_batteryLevelIsLow
- BREAKING CHANGE: Android
getBuildNumber
returns string like iOS (react-native-device-info#648) - BREAKING CHANGE: remove is24Hour, getTimezone, isAutoTimeZone and isAutoDateAndTime, getDeviceLocale, getDeviceCountry, getPreferredLocales
- This was the result of a survey. It removes API duplication in the react-native-community modules
- Related PR: zoontek/react-native-localize#65
- Use
yarn add https://github.com/mikehardy/react-native-localize.git#e062f0d2dc3171dc18fdb7b7139d347ad03933dc
to maintain isAutoTimeZone + isAutoDateAndTime until merged
- BREAKING CHANGE: iOS switch deprecated WebView for WebKit / getUserAgent returns Promise (react-native-device-info#757)
- The change from WebView to WebKit was required as the API is being removed from the iOS platform
- BREAKING CHANGE: if an API is platform-specific, all non-implementing platforms will return standard values of -1, false, or 'unknown' depending on return type
- This was how most APIs behaved before but it was not 100% - some returned null or empty string before
- getPhoneNumber sometimes returned null, now it will be 'unknown' if not known
- deprecated: IP-address-related methods deprecated - use @react-native-community/netinfo or react-native-network-info or react-native-carrier-info
- feat: all APIs are now restricted in Javascirpt to the platforms they have full implementations on so the web polyfill is up to date
- feat: 'getAndroidId' on Android returns android.provider.Settings.Secure.ANDROID_ID, read platform docs for usage
- feat:
getUsedMemory
(react-native-device-info#356) - feat: getDeviceName() without Bluetooth permission on Android (react-native-device-info#735)
- feat: TurboModule support (react-native-device-info#745) for these purposes (zoontek/react-native-localize#65)
- feat: allow for destructured ES6 imports (react-native-device-info#727)
- feat: update gradle, add react-native devDependency and build.gradle reference to enhance module developer experience
- fix: remove unnecessary gradle depencies (react-native-device-info#746)
- chore: de-linted all Java code, all Markdown
- fix: load module async by default with option to load sync (react-native-device-info#741)
- fix: add Huawei P30 devices to isNothc list (react-native-device-info#734)
- feat: AndroidX support (backwards/forwards compatible) (react-native-device-info#733)
- fix: isTablet() Android using Google-recommended / robust style (react-native-device-info#730)
- fix: re-fix crash PR #714, API level should be 24 (react-native-device-info#715)
- fix: crash on android api level less than 23 (react-native-device-info#714)
- feat: sync some methods from flutter (react-native-device-info#711)
- fix: additional checking in simulation method (react-native-device-info#710)
- docs(README): Add detail to ios getUniqueID() docs (react-native-device-info#707)
- fix: add missing devices to devices with notch list (react-native-device-info#702)
- build(Android): constrain play services dependency to pre-AndroidX 16.1.0 (react-native-device-info#693)
- fix(Android): Avoid NullpointerException on install referer listener (react-native-device-info#685)
- perf(Android): getConstants() optionally loaded in thread, speedup for most, init MainApplication with RNDeviceInfo(true) (react-native-device-info#680)
- fix: Add Xiaomi Redmi Note 7 to devicesWithNotch list (react-native-device-info#682)
- fix: adding conditions for tvOS location providers (react-native-device-info#678)
- docs: refresh example app and fix it so it works with tvOS
- docs: alter API Chart in README.md - isAutoDateAndTime and isAutoTimeZone return Promise (react-native-device-info#677)
- fix: checking for tvOS before attempting to get
isBatteryMonitoringEnabled
flag as tvOS doesn't support it (react-native-device-info#673) - types: make the typescript location / power returns specific (react-native-device-info#669)
- chore: move ios device model dictionary from native to javascript (react-native-device-info#670)
- fix:
getFreeDiskStorage()
to useStatFs
methods that returnlong
instead ofint
(which are now deprecated) (react-native-device-info#672)
- breaking: no functional change from 1.8.0, but isLocationEnabled requires minCompileSdk 28
- feat: Add
isLocationEnabled()
,getAvailableLocationProviders()
methods (react-native-device-info#664)
- feat: Add
getCameraPresence()
method (react-native-device-info#474)
- fix: added v to tag name in podspec (react-native-device-info#660)
- docs: Update README.md to have correct Podspec name (react-native-device-info#656)
- fix: fix building issue on tvOS / headers on iOS (react-native-device-info#652)
- chore: fix pointer types in iOS build (react-native-device-info#649)
- feat: implement hasSystemFeature() method for Android devices (react-native-device-info#646)
- chore: Update deviceinfo.js entry for xioami mi 8 lite (react-native-device-info#644)
- feat: Add
getBuildId
method to gets build number of the operating system. (react-native-device-info#640)
- chore: Add Xiaomi Mi A2 Lite to devices with notch (react-native-device-info#634)
- feat: Throw error if native module is null w/steps to help fix (react-native-device-info#630)
- fix: Use
RCTSharedApplication
so compile works for ios app extensions (react-native-device-info#408) - chore: Add 3rd generation iPad pro to device/model list (react-native-device-info#618)
- feat: Support
getUserAgent()
on old androids (API level <= 16) (react-native-device-info#545) - chore: Add Huweai INE-LX1 to devices with notch (react-native-device-info#624)
This is existing policy but is worth mentioning: The list with device names (returned by getModel()
) is maintained by the community and could lag new devices. It is recommended to use getDeviceId()
since it's more reliable and always up-to-date with new iOS devices. We do accept pull requests that add new iOS devices to the list with device names
- fix: repair flow types from #436 - 'Object' vs 'object'
- feat: add battery monitoring and detailed power state getter (react-native-device-info#436)
- feat: Add support for preferred languages function (react-native-device-info#610)
- feat: Support 'dom' Platform.OS for react-native-dom (react-native-device-info#406)
- feat: Add support for jest snapshot testing (react-native-device-info#375)
- fix: Use API-specific permissions to get phone number (react-native-device-info#269)
- fix: Add OnePlus A6010 to devicesWithNothc list (react-native-device-info#604)
- fix: use reactContext vs getApplicationContext() (react-native-device-info#382)
- fix: dynamic reference path on windows depending on environment (react-native-device-info#608)
- Add
supportedABIs()
(react-native-device-info#598)
- fix: Add Nokia 7.1 to devicesWithNotch list (react-native-device-info#597)
- First major version, features (and bugs) copied from 0.29.1
- Fix lint errors (library dependences, ignore permissions) (react-native-device-info#590)
On March 12 2019, this repository was moved from https://github.com/rebeccahughes/react-native-device-info to https://github.com/react-native-community/react-native-device-info
- Add
isAutoDateAndTime()
andisAutoTimeZone()
(react-native-device-info#583)
- Add 'POCOPHONE F1' to list of notch devices (react-native-device-info#584)
- Updated Android SDK to version 28 (react-native-device-info#548)
- Enabled battery monitoring mode to get actual battery data (react-native-device-info#404)
- Added
isBatteryCharging()
(react-native-device-info#514)
- Use BigInteger to avoid overflow in Disk related functions (react-native-device-info#587)
- Fix hasNotch() support for LG phones (react-native-device-info#573)
- Fixed getDeviceType method (react-native-device-info#571)
- Added Huawei P20 Lite to notch devices (react-native-device-info#568)
- Added OnePlus 6T to notch devices (react-native-device-info#563)
- Added
getDeviceType()
and used it inisTablet()
(react-native-device-info#560)
- Added Google Pixel 3XL to notch devices (react-native-device-info#535)
- Added
isAirPlaneMode()
(react-native-device-info#524) - Compare
hasNotch()
devices with lowercase (react-native-device-info#537) - Added several devices to
hasNotch()
(#533, #549, #550)
- Support React Native Windows 0.57, minimal version is now 10.0.14393 for the target platform
- Update typescript definitions (react-native-device-info#498)
- Update build.gradle to remove compile warning (react-native-device-info#520)
- Added
isLandscape()
(react-native-device-info#504)
- Add
hasNotch()
(react-native-device-info#500)
- Support new models (XR, XS, XS Max) and iPad 6th Gen (react-native-device-info#499)
- Fix typescript declaration export (react-native-device-info#478)
- Shrank the npm package size (react-native-device-info#477)
- Fixed
eslint-plugin-import
error (react-native-device-info#466)
- Fixed Android build error introduced in 0.22.1 (react-native-device-info#460)
- Fix deprecated code on Android in the following methods (react-native-device-info#426)
- getDeviceCountry
- getDeviceLocale
- Add support for
getIpAddress
andgetMacAddress
on iOS (https://github.com/react-native-community/react-native-device-info/commit/41735bd0b2efe1f626afc066604f27073acb9d4c)
- Rolled back the Pod change made in 0.21.1
- Move back the podspec file to the root directory (react-native-device-info#376)
- Moved the IOS code to an ios/ directory (react-native-device-info#374)
- Fix getBatteryLevel() for tvOS (always return 1) (react-native-device-info#363)
- Remove deprecated React pod dependency (react-native-device-info#361)
- Add more gradle configuration properties
compileSdkVersion
,buildToolsVersion
,targetSdkVersion
(react-native-device-info#343)
- Made the following methods compatible with UWP: (react-native-device-info#345)
getBatteryLevel()
getFirstIntallTime()
getIPAddress()
getMaxMemory()
isPinOrFingerprintSet()
- Add
getInstallReferrer
(react-native-device-info#344)
- Add
getBatteryLevel
(react-native-device-info#359)
- Fix
getMACAddress
for Android > 6 (react-native-device-info#349)
- Fix production build crash on Android introduced in #313
- Enhance
isTablet()
for android by checking display density (react-native-device-info#313) - Changed iOS target deployment from 9.0 to 8.0 for broader device support (react-native-device-info#19)
- Fix bad import for web polyfill
- Add an empty polyfill for
react-native-web
users (react-native-device-info#339)
- Add the
googlePlayServicesVersion
Gradle build config that allows you to set the Play Services version from the root-project (react-native-device-info#333)
- Fix crash on iOS: prevent insertion of nil values in the dictionary (react-native-device-info#328)
- Fix crash on
getFreeDiskStorage
andgetTotalDiskCapacity
from invalid filesystem path (react-native-device-info#320)
- Fix Android compatibility for
getFreeDiskStorage
andgetTotalDiskCapacity
(react-native-device-info#319)
- Add
getFontScale
(react-native-device-info#278) - Add
getFreeDiskStorage
andgetTotalDiskCapacity
(react-native-device-info#302) - Fix missing flow definition for
getApplicationName
- Fix tvOS support (react-native-device-info#283)
- Introduced
getApplicationName
to see the name of the app both on ios, android and win - Added
getTotalMemory
andgetMaxMemory
(react-native-device-info#289) - Fix iOS undefined native module error (react-native-device-info#276)
- Fix crash on
getUserAgent
when Webview is not installed (react-native-device-info#273)
- Add
getCarrier
(react-native-device-info#261) - Disable
isPinOrFingerprintSet
for tvOS (react-native-device-info#270) - Add
is24Hour
(react-native-device-info#265) - Remove unused windows dependency (react-native-device-info#263)
- Add missing typescript definitions (react-native-device-info#254)
- Make play-services optional (react-native-device-info#226)
- Critical fix on WIFI STATE (react-native-device-info#249)
- Get real WebView UserAgent on Android (react-native-device-info#207)
- Add DeviceUID.h to public headers (react-native-device-info#217)
- Add
getPhoneNumber
(react-native-device-info#174) - Fix typescript definitions (react-native-device-info#221)
- Add
getFirstInstallTime
andgetLastUpdateTime
(react-native-device-info#222) - Added version check and permission to work with Android API >= 16 (react-native-device-info#225)
- Added device detection even when in an iOS emulator (react-native-device-info#224)
- Add support for new iPhone, iPad, and Apple TV models (react-native-device-info#230)
- Add android only
getAPILevel
method (react-native-device-info#232) - Add Android support for serial number, IP, and MAC address (react-native-device-info#150)
- Add tvOS support (react-native-device-info#235)
- Add flow types
- Fix getCurrentActivity() null crash in Android (react-native-device-info#247)
- Add support for RN > 0.47
- Update typescript definitions
- Add typescript definitions
- Add
isPinOrFingerprintSet
method - Add support for RN > 0.40
- Semver fix
Several bugfixes and detecting if device is a tablet
adds support for Brand information e.g. apple, htc, etc
adds support for the iPhone SE and new iPad Pro
adds support for device country and changes the iOS device name to match Apple branding
don't use destructuring
removes the default bluetooth permission
change deployment target to iOS 8
removes unnecessary peerDependencies
tweaks how device locale works on Android. If it's available it will use the toLanguageTag that is more inline with iOS. (See #14)
adds two new parameters, Device Locale and User Agent.
adds a new parameter; Device Id. On iOS this is the hardware string for the current device (e.g. "iPhone7,2"). On Android we use the BOARD field which is the name of the underlying board, e.g. "goldfish". The way that the module gets the device model on iOS has also changed to be based on the Device Id; now instead of getting a generic product family e.g. "iPhone", it will return the specific model e.g. "iPhone 6".