[android] Remove unnecessary version checks (#24203)# Why This PR is related to #24201, it removes unnecessary version checks # How Remove version check logic for SDK's < 23 # Test Pla
[android] Remove unnecessary version checks (#24203)# Why This PR is related to #24201, it removes unnecessary version checks # How Remove version check logic for SDK's < 23 # Test Plan Tested in Bare Expo in Android 13 simulator
show more ...
[device] Add deviceType constant (#21633)Co-authored-by: Tomasz Sapeta <[email protected]>
[device][Android] Fix spotless
[device][Android] Fix Device.getDeviceTypeAsync() returns TABLET on certain Android devices (#21325)# Why Fixes https://github.com/expo/expo/issues/18127. On some devices type of the device was
[device][Android] Fix Device.getDeviceTypeAsync() returns TABLET on certain Android devices (#21325)# Why Fixes https://github.com/expo/expo/issues/18127. On some devices type of the device was incorrectly shown as tablet on Android. # How Added checking the type of the device based on the smallest screen width quantifier ([docs](https://developer.android.com/guide/topics/resources/providing-resources#SmallestScreenWidthQualifier)). If this fails the old method is used, but it now uses getRealMetrics instead of getMetrics in order to get the correct screen proportions and size. Also updated the deprecated functions. # Test Plan Tested in different android API versions and virtual devices (tablet/phone) to check if the type of the device returned is correct.
[android][expo-device] migrate to new modules API (#20118)# Why Migrate module to use new modules API # How Followed the usual steps involved in migrating a module # Test Plan Tested using
[android][expo-device] migrate to new modules API (#20118)# Why Migrate module to use new modules API # How Followed the usual steps involved in migrating a module # Test Plan Tested using the bare expo app. Continues to work as before.
[device] Fix deviceName exception on android sdk > 31 (#19666)# Why fix #18738 # How `<bluetooth_name> is only readable to apps with targetSdkVersion lower than or equal to: 31` for and
[device] Fix deviceName exception on android sdk > 31 (#19666)# Why fix #18738 # How `<bluetooth_name> is only readable to apps with targetSdkVersion lower than or equal to: 31` for android sdk > 31, we get the device name from `Settings.Global(..., Settings.Global.DEVICE_NAME)`. this is from: https://stackoverflow.com/a/66651458 # Test Plan bare-expo + targetSdkVersion 33 + android emulator 33 + NCL device
[android][expo-modules-core] better android emulator detection (#18394)* [android][expo-modules-core] better android emulator detection * [android][expo-modules-code] comment re: emulator detect
[android][expo-modules-core] better android emulator detection (#18394)* [android][expo-modules-core] better android emulator detection * [android][expo-modules-code] comment re: emulator detection logic * [android] optimize emulator check Co-authored-by: Kudo Chien <[email protected]> * [android] optimize emulator check Co-authored-by: Kudo Chien <[email protected]> Co-authored-by: kbrandwijk <[email protected]> Co-authored-by: Kudo Chien <[email protected]>
[expo-device][android] Rewrite android code to Kotlin (#13955)# Why This task was done as a part of migrating expo modules to Kotlin projec. # How The code had been initially converted fro
[expo-device][android] Rewrite android code to Kotlin (#13955)# Why This task was done as a part of migrating expo modules to Kotlin projec. # How The code had been initially converted from Java to Kotlin with help of Android Studio's conversion tool. Then I was manually adjusted / improved. # Test Plan BareExpo (test-suite + ncl) # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`).
[expo-modules] Move code from `unimodules` into `expo-modules-core` (#13703)# Why Migrated `unimodules-core`, `unimodules-react-native-adapter`, `unimodules-app-loader` into `expo-modules-core`
[expo-modules] Move code from `unimodules` into `expo-modules-core` (#13703)# Why Migrated `unimodules-core`, `unimodules-react-native-adapter`, `unimodules-app-loader` into `expo-modules-core` # How - Change package using AS refactor tools - Fix some places where AS wasn't able to do automatically - Fix compatibility with new auto-linking - Ensure that classes which are used during installation steps are still available in the old place # Test Plan - expo-go (tested using unversioned and 41) - bare-expo
[device] Group related fields/methods, add TS types, add more complete web support (#5075)This is a holistic revision of expo-device: - Added `NS_ASSUME_NONNULL_BEGIN/END` to the iOS code. - Re
[device] Group related fields/methods, add TS types, add more complete web support (#5075)This is a holistic revision of expo-device: - Added `NS_ASSUME_NONNULL_BEGIN/END` to the iOS code. - Related fields are now grouped. For example, all of the `osXXX` fields are now documented together, and all the fields related to the model ID and name are together. - I also ordered the fields and methods by what I assumed to be most relevant. More general or common fields/methods are ordered first. - Changed the order of fields and methods in the code (across all platforms) to match the documentation order -- this way related fields/methods are grouped in the code as well. - Renamed the root detection error code to `ERR_DEVICE_ROOT_DETECTION` to make it clear that when this code is thrown, it has to do with root detection. - Added TS types to the API layer so that e.g. `Device.osName` is `string | null`. - Ensured that universally expected fields in the platform layer are always specified (even if that specified value is `null`) so that we never give developers `undefined`. - Added more complete web support -- tested the UA parsing library we use on various UA strings (iOS, Android, Windows). - Documented the web behavior more thoroughly in examples. - Changed the values of the TS enum values to be numbers instead of strings, and changed the corresponding native code. This is more compact and quicker to do a comparison. - Made `Device.getPlatformFeaturesAsync()` return an empty array on platforms that don't support it so we have one fewer method that returns null. Test plan: compile on iOS and Android, and launch with Expo Web.
[expo-device] Add expo-device module (#4682)* Create the highly anticipated Device module