[android] Kotlinize headless and detached app stuff (#14000)
[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)
[expo-notifications] Fix crashes when Proguard is enabled (#10421)# Why Fixes https://github.com/expo/expo/issues/10407. # How - fixed `DoNotStrip` annotation not working with classes -
[expo-notifications] Fix crashes when Proguard is enabled (#10421)# Why Fixes https://github.com/expo/expo/issues/10407. # How - fixed `DoNotStrip` annotation not working with classes - added `DoNotStrip` to `NotificationsScoper` I've also re-apply fix from https://github.com/expo/expo/pull/10411 using annotation. See https://github.com/expo/expo/pull/10411#issuecomment-699935746. # Test Plan - bare-expo ✅ - using steps below ✅ 1. expo init ExpoBare 2. select Bare workflow -> minimal 3. cd ExpoBare 4. expo install expo-notifications 5. Open project in Android Studio 6. Enable Proguard (update enableProguardInReleaseBuilds from false to true in app/build.gradle file) 7. Create release build 8. Run apk on device # Changelog - [expo-notifications] Fixed crashing when Proguard is enabled. - Fixed `DoNotStrip` annotation not working with classes.
[android] Do not strip HeadlessAppLoader constructors required by AppLoaderProvider (#7398)# Why Locally built SDK37 standalone app was failing to start with the following exception: > ``` >
[android] Do not strip HeadlessAppLoader constructors required by AppLoaderProvider (#7398)# Why Locally built SDK37 standalone app was failing to start with the following exception: > ``` > Attempt to invoke interface method 'boolean l.d.a.c.b(java.lang.String)' on a null object reference > ``` # How Inspecting the APK showed that this exception originates in `TaskService#isStartedByHeadlessLoader`, where `isRunning()` is called on `getAppLoader()`. We wouldn't expect `getAppLoader()` to ever be `null`, since: - `RNHeadlessAppLoader` is registered in the `@unimodules/react-native-adapter`'s package - `ExpoHeadlessAppLoader` is registered in `ExpoApplication` but it was. A few lines before this exception, a short error message was printed: `Expo: Cannot initialize app loader. <init> [class android.content.Context]` This, after some debugging, has led me to figure out that in production mode (this problem didn't occur in debug mode) ProGuard removes supposedly unused constructors of `RNHeadlessAppLoader` and `ExpoHeadlessAppLoader`. Adding a `@DoNotStrip` annotation to the constructors fixed the issue. I have also added: - `if (getAppLoader() == null)` checks to `TaskService` not to crash the application if, for some reason, app loader isn't there, - `e.printStackTrace()` to where the `Cannot initialize app loader. <init> [class android.content.Context]` was logged to help debug issues next time. # Test Plan On a separate branch I have applied this change, rebuilt the appropriate `expokit` Maven libraries, built a standalone app and it started without problems.
[android][task-manager] Task manager for bare in Expo (#6828)Task manager for bare android and iOS applications.