[expo-updates][expo-go] Support new SDK version field in new manifests (#22356)
[android] Fix another background task exception (#15591)# Why yet another exception specific happen to background task manager, especially switching from background to foreground. the `JSIModule
[android] Fix another background task exception (#15591)# Why yet another exception specific happen to background task manager, especially switching from background to foreground. the `JSIModulePackage` is called before the `ReactInstanceManager` attached to `ReactNativeActivity`. in this case, we will get a NPE like this: ``` wn:ReactInstanceManager W Instance detached from instance manager ExperienceActivity E java.lang.NullPointerException j E Runtime exception in RNObject when calling method getDevSupportManager: java.lang.NullPointerException: null receiver System.err W java.lang.reflect.InvocationTargetException W at java.lang.reflect.Method.invoke(Native Method) W at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:4) W at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:1) W at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:19) W at java.lang.Thread.run(Thread.java:920) W Caused by: com.facebook.react.common.JavascriptException W at host.exp.exponent.ReactNativeStaticHelpers.handleReactNativeError(ReactNativeStaticHelpers.kt:8) W ... 5 more ``` fixes #15515 # How - leverage kotlin nullable for `ReactNativeActivity.devSupportManager` - backport VersionedUtils changes to versioned code # Test Plan - [standalone app] follow #15515 steps - [versioned expo go] test changed functions from sdk41-44 & unversioned apps - reload - toggleElementInspector - togglePerformanceMonitor - toggleRemoteJSDebugging Co-authored-by: Łukasz Kosmaty <[email protected]> Co-authored-by: Bartłomiej Klocek <[email protected]>
show more ...
[expo-updates][android] Make onBundleCompleted non-nullable (#14838)
[android][expo-manifests] Audit usage of getSDKVersion to ensure lack of requirement (#14237)
[expo-manifests] Rename RawManifest -> Manifest (#14194)
[expo-updates] Factor out raw manifests into their own package (#14183)
[android] Kotlinize versioned core (#14043)
[android] Kotlinize RNObject and KernelModule (#14042)
[android] Kotlinize headless and detached app stuff (#14000)
[android] Kotlinize ReactNativeActivity and ExperienceActivity (#13870)
[android] Fix erroneous manifest JSON direct access (#13906)
[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
[android] Fix null pointer when working with null manifest (#13496)
[kernel] Fix `getInitialURL` returns `https://expo.io:443/<team>/<slug>` instead of null in standalone app (#13071)# Why Closes ENG-1141. Fixes https://github.com/expo/expo/issues/11920. # H
[kernel] Fix `getInitialURL` returns `https://expo.io:443/<team>/<slug>` instead of null in standalone app (#13071)# Why Closes ENG-1141. Fixes https://github.com/expo/expo/issues/11920. # How On both platforms, we pass manifest URL to liking module if the initial URL is null. It's not the desired behavior right now. It looks like we used it in the past but not anymore. So I removed the code that was responsible for changing the initial URL. # Test Plan - check if the linking module work in Expo Go on both platforms ✅ - build local shell apps using `et android-shell-app` and `et ios-shell-app` and confirm that `getInitialURL` returns null using a simple app > Note: local shell apps are not the same as those produced by turtle because I needed to change a few things to compile them. However, the code which is responsible for starting the app should be the same.
[updates] Finish conversion to an interface for raw manifests (#12509)
[android] Expo Client -> Expo Go (#10867)Why: See #10847 for a fuller explanation. This commit replaces references to the Expo Client app with references to Expo Go in the Android app. How: Se
[android] Expo Client -> Expo Go (#10867)Why: See #10847 for a fuller explanation. This commit replaces references to the Expo Client app with references to Expo Go in the Android app. How: Searched for "expo client" in `android` and manually looked over each search result. Most of the strings were straightforward find & replace, but I made sure each string reads well. Test Plan: Made sure the Android app compiles and runs with `./gradlew debug`. Confirmed the app on the Android home screen gets shown as Expo Go.
[android] fix notifications for standalone apps with updates disabled (#10570)
[task-manager] Use versioned lifecycle constant when starting headless client (#10409)
[android][ios][expo-updates] add loading and error indicators for synchronous loads in clients (#9785)
[android][ios][expo] switch to expo-updates AppLoader and remove legacy Updates module (#9764)# Why Actually use expo-updates in the managed workflow! # How - Switched to expo-updates AppL
[android][ios][expo] switch to expo-updates AppLoader and remove legacy Updates module (#9764)# Why Actually use expo-updates in the managed workflow! # How - Switched to expo-updates AppLoader in all usages except for home. - Allow loading UNVERSIONED experiences by adding it to the list allowed by the SelectionPolicy. - Remove exported legacy Updates module from Android/iOS unversioned code and from the `expo package` # Test Plan Test loading UNVERSIONED sandbox experience in both clients, import the `Updates` package from `expo` and ensure the correct error is logged. Other testing has been done by applying commit c36a821 to all the previous PRs from the last few weeks.
[expoview] Fix crash when launching headless contextcrash at `reactInstanceManager.call("createReactContextInBackground")``reactInstanceManager` might be null somehow.It happened on an Expokit a
[expoview] Fix crash when launching headless contextcrash at `reactInstanceManager.call("createReactContextInBackground")``reactInstanceManager` might be null somehow.It happened on an Expokit app.I got this crash when I do followings.- start a background location task with foreground service.- kill activity from "Recents Screen"- start app from launcher => crashBut there might exist other way to reproduce this crash.
[android][task-manager] Task manager for bare in Expo (#6828)Task manager for bare android and iOS applications.
[task-manager] Fix crash in HeadlessAppLoader after the activity is killed (#6879)devSupportManager can be null. This is evident both from my experience and from similar code in: https://github.co
[task-manager] Fix crash in HeadlessAppLoader after the activity is killed (#6879)devSupportManager can be null. This is evident both from my experience and from similar code in: https://github.com/expo/expo/blob/0ec9e78c4e4ff0656eaa861b50618a80b8650952/android/expoview/src/main/java/host/exp/exponent/experience/ReactNativeActivity.java#L293 I tried it on an ejected to ExpoKit app, though I believe it's the same for expo client too. # Why This crash was preventing background fetch from working, as the app was crashing when trying to restart. This is probably related to the many background task issues in the issue tracker such as: #3503, #3582, #4860 and potentially others. # How I have not been able to test it locally (no idea how to build expo kit, and wasn't able to get help on the Slack), though the code seems right, and it's a trivial change. (How can I build ExpoKit locally)? # Test Plan 1. Add a background fetch task on Android: ``` BackgroundFetch.registerTaskAsync(BACKGROUND_SYNC_TASK_NAME, { minimumInterval: 1 * 60, // one minute stopOnTerminate: false, startOnBoot: true, }); ``` 2. Move the activity to background (maybe let it even run the task once, for good measure). 3. Go to the app switcher -> swipe out the task application 4. Wait another minute and see that the task isn't running. Look in the logs and see it's because it's crashing. This patch should fix it.
[android] Fix headless app loader in ejected apps (#5873)# Why We want TaskManager to use DetachedModuleRegistryAdapter. https://stackoverflow.com/a/5756989 <- (really important) # How
[android] Fix headless app loader in ejected apps (#5873)# Why We want TaskManager to use DetachedModuleRegistryAdapter. https://stackoverflow.com/a/5756989 <- (really important) # How # Test Plan EXPO_VIEW_DIR="../../../expo" EXPO_DEBUG=true expo_dev eject Test ejected app: <details> <summary> App.tsx </summary> ```Javascript import React from 'react'; import * as Location from 'expo-location'; import * as TaskManager from 'expo-task-manager'; import * as Permissions from 'expo-permissions'; import { Text, TouchableOpacity } from 'react-native'; import axios from 'axios'; import moment from 'moment'; const LOCATION_TASK_NAME = 'background-location-task'; export default class Root extends React.Component { constructor() { super(); this.state={}; this.initState(); } async initState() { const x = await Location.hasStartedLocationUpdatesAsync(LOCATION_TASK_NAME); this.setState({running: x}); } async on() { await Permissions.askAsync(Permissions.LOCATION); await Location.startLocationUpdatesAsync(LOCATION_TASK_NAME, { timeInterval: 0, distanceInterval: 0, accuracy: Location.Accuracy.High, }); }; async off() { await Location.stopLocationUpdatesAsync(LOCATION_TASK_NAME); }; render() { return ( <React.Fragment> <Text>Running: {this.state.running?"Yes":"No"}</Text> <TouchableOpacity onPress={this.initState.bind(this)}> <Text>Refresh</Text> </TouchableOpacity> <TouchableOpacity onPress={this.on}> <Text>Enable background location</Text> </TouchableOpacity> <TouchableOpacity onPress={this.off}> <Text>Disable background location</Text> </TouchableOpacity> </React.Fragment> ); } } TaskManager.defineTask(LOCATION_TASK_NAME, async ({ data, error }) => { try { if (error) { await axios.get("http://192.168.1.14:8000/error"); //console.log("error:", error); } if (data) { // just so I know if it's happening or not await axios.get("http://192.168.1.14:8000/loc?ts=" + moment().format()); //console.log("data:", data); } } catch (e) { } }); ``` </details> * fix Headless app loader * check if standalone
[packages] Move unimodules foundation to `org.unimodules` scope
12