[packages] fix another gradle 8 warnings (#22609)# Why there are other gradle 8 build warnings: ``` > Task :expo:processReleaseManifest package="expo.core" found in source AndroidManifest.x
[packages] fix another gradle 8 warnings (#22609)# Why there are other gradle 8 build warnings: ``` > Task :expo:processReleaseManifest package="expo.core" found in source AndroidManifest.xml: /home/runner/work/expo/expo/packages/expo/android/src/main/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. ``` # How migrate `package` in **AndroidManifest.xml** to `namespace` in **build.gradle** # Test Plan ci passed
show more ...
[android][sharing] Fix shareAsync not resolving (#21432)
[android][expo-sharing] migrate to new modules API (#20112)# Why Migrate module to new modules API # How Followed the usual steps involved in migrating a module # Test Plan Tested in the b
[android][expo-sharing] migrate to new modules API (#20112)# Why Migrate module to new modules API # How Followed the usual steps involved in migrating a module # Test Plan Tested in the bare expo app and all works as before. I removed onActivityResult as all it did was resolve the promise with null but I don't think this is necessary anymore with the new API. It can easily be put back if that was not correct.
[sharing] Fix return type of `shareAsync` (#18019)- Changed the native implementations to resolve their promises with null/nil. Web is already ok - Changed the return type of `shareAsync` to `Prom
[sharing] Fix return type of `shareAsync` (#18019)- Changed the native implementations to resolve their promises with null/nil. Web is already ok - Changed the return type of `shareAsync` to `Promise<void>` - Regenerated docs Co-authored-by: Expo Bot <[email protected]>
[android] Fix kotlin nullability issues (#14333)
[android][sharing] Rewrite module from Java to Kotlin (#14010)
[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
[file-system] Migrate interface to expo-modules-core (#12918)
[expo] Add queries to `AndroidManifest` (#11829)# Why Followup of https://github.com/expo/expo/pull/11787. Adds queries to AndroidManifest. Otherwise, the app can't access some system feature
[expo] Add queries to `AndroidManifest` (#11829)# Why Followup of https://github.com/expo/expo/pull/11787. Adds queries to AndroidManifest. Otherwise, the app can't access some system features on Android 11. For more information read https://developer.android.com/about/versions/11/privacy/package-visibility and https://developer.android.com/training/basics/intents/package-visibility-use-cases#open-a-file. # How Searched for `resolveActivity`, `queryIntentActivities` and `queryIntentServices` and checked if `AndroidStudio` suggest adding query. If yes added. Otherwise, ignored. > **Note**: I'm not sure if I found every place very we should add "queries", but we for sure find those in the QA. Moreover, this feature was introduced in Android 11, and not every intent query needs a manifest entry. # Test Plan I've tested some functionalities with the Android emulator running Android 11, but I don't have access to a real device. So I could miss something.
[expo-sharing][expo-sms] fix attachment intents on Android 11 (#10034)
[unimodules] Remove uncoded version of an exception (#9961)# Why It's obsolete and actually worse than the other one. # How Removed all usages of the class and removed the class too. #
[unimodules] Remove uncoded version of an exception (#9961)# Why It's obsolete and actually worse than the other one. # How Removed all usages of the class and removed the class too. # Test Plan Android Client compiles well. **Note:** I'm not about the sections where to put this change. I thought: `@unimodules/core` from now on seizes to be compatible with older `expo-brightness` and `expo-sharing`, so it's kind of breaking.
[expo-sharing] Fixed sharing external URIs on Android (#9223)# Why Fixes #9222. # How According to [Android docs](https://developer.android.com/reference/androidx/core/content/FileProvider#Spe
[expo-sharing] Fixed sharing external URIs on Android (#9223)# Why Fixes #9222. # How According to [Android docs](https://developer.android.com/reference/androidx/core/content/FileProvider#SpecifyFiles), `FileProvider` should have added `external-files` path in order to be able to access locations like `DCIM` or `Downloads`. I added that line to `[sharing_provider_paths.xml](https://github.com/expo/expo/blob/master/packages/expo-sharing/android/src/main/res/xml/sharing_provider_paths.xml)`. That fixed the issue, but after that I encountered following exception in Android Studio only: ``` E/DatabaseUtils: Writing exception to parcel java.lang.SecurityException: Permission Denial: reading expo.modules.sharing.SharingFileProvider uri content://host.exp.exponent.SharingFileProvider/expo_external_files/Download/IMG_2704.PNG from pid=16627, uid=1000 requires the provider be exported, or grantUriPermission() at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:820) at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:684) at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:674) at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:548) at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:327) at android.os.Binder.execTransactInternal(Binder.java:1154) at android.os.Binder.execTransact(Binder.java:1123) ``` However, photos were sharing correctly, but I managed to fix it. I [followed the docs](https://developer.android.com/reference/androidx/core/content/FileProvider#Permissions) and updated `Intent` creation in `SharingModule.createSharingIntent()` by replacing `putExtra()` with `setData()` which resolved exception above. # Test Plan I only tested my changes using demo code from issue on API 29 & 30. Sources I used: - [Android `FileProvider `docs](https://developer.android.com/reference/androidx/core/content/FileProvider) - [Android `Intent` docs](https://developer.android.com/reference/android/content/Intent.html) - [This article](https://medium.com/@quiro91/sharing-files-through-intents-part-2-fixing-the-permissions-before-lollipop-ceb9bb0eec3a), however it made me a bit confused about `Intent.FLAG_GRANT_READ_URI_PERMISSION` flag
Migrate to androidx (#5521)# Why resolves: https://github.com/expo/expo/issues/5260 # How https://developer.android.com/jetpack/androidx/migrate https://blog.danlew.net/2018/11/14/the-rea
Migrate to androidx (#5521)# Why resolves: https://github.com/expo/expo/issues/5260 # How https://developer.android.com/jetpack/androidx/migrate https://blog.danlew.net/2018/11/14/the-reality-of-migrating-to-androidx/ https://gist.github.com/loganj/7535a13e98be83460f362b63dbd13e07 # Test Plan Run NCL, native tests (androidTest, test)
[image-picker][sharing] Fix provider paths problem (#4717)
[unimodules][android] Change ModuleRegistryConsumer to RegistryLifecycleListener (#4345)# Why Modules need to know when they should release resources.
[packages] Move unimodules foundation to `org.unimodules` scope
[expo-sharing] Add expo-sharing module with basic functionality (#3556)## Why Package was response for users request about possibility to share to other platforms, especially instagram https://
[expo-sharing] Add expo-sharing module with basic functionality (#3556)## Why Package was response for users request about possibility to share to other platforms, especially instagram https://expo.canny.io/feature-requests/p/make-it-possible-to-share-an-image-to-instagram-on-ios-and-android ## How Created new `expo-sharing` package with basic sharing functionality. On Android used Intent `Intent.ACTION_SEND` and to ensure file is accessible for third applications used `FileProvider`. On iOS used `UIDocumentInteractionController presentOpenInMenuFromRect` to open action sheet. For android added `mimeType` property, for iOS added `UTI` to be able to control shown applications that can handle file. ## Test Plan Test using NCL Sharing module.