[background-fetch][Android] Migrated codebase to use Expo modules API (#23903)# Why Migrated codebase to use Expo modules API # Test Plan - bare-expo ✅
Remove unimodules-task-manager-interface on Android (#16683)
[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
show more ...
[android] Use stable manifest ID where applicable (#12964)
Add null checks to minimize probability of NPE in TaskManager. (#8868)During QA for SDK38 came up some NPE crashes while testing background tasks. Those checks does not provide full safety. Co-aut
Add null checks to minimize probability of NPE in TaskManager. (#8868)During QA for SDK38 came up some NPE crashes while testing background tasks. Those checks does not provide full safety. Co-authored-by: Łukasz Kosmaty <[email protected]> Co-authored-by: Eric Samelson <[email protected]>
@mczernek/app loader migration (#8438)* Fix overloading of AppLoaders condition. * Add information about AppLoader to AndroidManifest's meta-data and consume it in AppLoaderProvider. * Handle
@mczernek/app loader migration (#8438)* Fix overloading of AppLoaders condition. * Add information about AppLoader to AndroidManifest's meta-data and consume it in AppLoaderProvider. * Handle reinstalling of an application in task manager, even when ejecting in the meantime. * Update CHANGELOG.md * Move changelog entry to Bug Fixes. Fix typo. * Add some comments. * Resatrt alarm after reinstallation not only for startOnBoot option. * Remove waiting for debugger. * Fix CHANGELOGs. * Apply suggestions from code review Co-authored-by: Tomasz Sapeta <[email protected]> Co-authored-by: Tomasz Sapeta <[email protected]>
[android][task-manager] Task manager for bare in Expo (#6828)Task manager for bare android and iOS applications.
[unimodules][android] Change ModuleRegistryConsumer to RegistryLifecycleListener (#4345)# Why Modules need to know when they should release resources.
[android][task-manager] Limit a task to schedule only one job at a time (#4247)# Why Should fix #4206 # How Previously one task could schedule many jobs which could led to a crash with a m
[android][task-manager] Limit a task to schedule only one job at a time (#4247)# Why Should fix #4206 # How Previously one task could schedule many jobs which could led to a crash with a message `Apps may not schedule more than 100 distinct jobs`. It is possible that sometimes new locations come more often than jobs were being executed, so these jobs accumulated over time and then caused this crash. I changed it so that one task can schedule only one job at a time - whenever new location comes up and the previous job is still pending, we will cancel that job and reschedule it adding new location to its extras. The data we store in job extras is now a list of `PersistableBundle` (that contains single location/geofencing data) and we just add another bundle to the list when we need to update existing job. # Test Plan Tested background location example in NCL
[packages] Move unimodules foundation to `org.unimodules` scope
[android][ios][ts][docs][ncl] implement background fetch on Android (#3281)# Why Closes https://expo.canny.io/feature-requests/p/android-background-fetch-support # How Android doesn't have
[android][ios][ts][docs][ncl] implement background fetch on Android (#3281)# Why Closes https://expo.canny.io/feature-requests/p/android-background-fetch-support # How Android doesn't have its own background fetch feature, however I could easily imitate its behavior using `AlarmManager` with wakeup option. I also had to change a few things in `TaskManager`, the most important one is the change in pending intents. Now, two pending intents created for the same task will be equal (see https://developer.android.com/reference/android/content/Intent#filterEquals(android.content.Intent)). Thanks to this, it's easier to cancel existing pending intents. # Test Plan Tested against `BackgroundFetch` example in `native-component-list`
[ios][android][sdk][ncl] Background location, geofencing and background fetch (#2338)# Why Canny issues: - https://expo.canny.io/feature-requests/p/background-tasks-support - https://expo.cann
[ios][android][sdk][ncl] Background location, geofencing and background fetch (#2338)# Why Canny issues: - https://expo.canny.io/feature-requests/p/background-tasks-support - https://expo.canny.io/feature-requests/p/background-location-tracking - https://expo.canny.io/feature-requests/p/geofencing-api Related PR: - https://github.com/expo/universe/pull/3201 (docs) # How The core of this PR is to implement TaskManager that provides an API to manage tasks, especially these that run while the app is in the background. I hope I documented this piece enough so I don't have to write it here again This PR also adds three ways of how we can use background tasks: - Background location updates `Location.startLocationUpdatesAsync`, `Location.stopLocationUpdatesAsync`, `Location.hasStartedLocationUpdatesAsync` - Geofencing `Location.startGeofencingAsync`, `Location.stopGeofencingAsync`, `Location.hasStartedGeofencingAsync` - Background fetch `expo-background-fetch` module, *iOS only so far* Also, to improve the quality of `expo-location`, I've deprecated `enableHighAccuracy` option and introduced a new one called `accuracy`. It allows to use all possible accuracies provided by iOS platform. Android has fewer options of accuracy, but I've made simple mapping (see https://github.com/expo/expo/pull/2338/files#diff-66bdbbc66d3410d9198aa17584b5409eR633). All new modules and `expo-location` are now TypeScripted # Test Plan New APIs examples in `native-component-list`: - `BackgroundFetch` - shows the status and the date of the last background fetch which can be manually triggered in Xcode (Debug -> Simulate background fetch). - `Location` -> `Background location map` - it tracks your location by drawing a polyline. - `Location` -> `Geofencing map` - this one will work better once we merge #2316, as it should show local notifications when the device enters/exits a region. - `TaskManager` - shows all registered tasks for the experience. There are also some quick tests in `test-suite` for the new methods in `Location` and `TaskManager` modules.