[expo-print][android] Migrate the expo-print module to the new modules API (#21714)# Why Expo-print was written using the old API, the docs were missing description of the differences between A
[expo-print][android] Migrate the expo-print module to the new modules API (#21714)# Why Expo-print was written using the old API, the docs were missing description of the differences between Android and iOS in `printAsync` promise resolving. # How Converted to new modules API, modified the module to use kotlin Coroutines. Updated the docs to make the differences between Android and iOS clearer. There was also an unnecessary `@platform ios` label in `PrintOptions.uri` as this option also works on Android. # Test Plan Tested the library on a physical printer and print to file on a physical device. --------- Co-authored-by: Expo Bot <[email protected]>
show more ...
[expo-print] Fix crash when writing PDF (#18911)# Why When printing to file multiple times on some devices, expo-print crashes with java.lang.NullPointerException. This is because the callback m
[expo-print] Fix crash when writing PDF (#18911)# Why When printing to file multiple times on some devices, expo-print crashes with java.lang.NullPointerException. This is because the callback method onWriteFailed does not accept null arguments. # How I have created an issue #18910 which describes the steps I've taken to create this bug including a snack that can reproduce it on some devices. The crash is caused by something in WebView and I traced it back to the Android docs here: https://developer.android.com/reference/android/print/PrintDocumentAdapter.WriteResultCallback#onWriteFailed(java.lang.CharSequence) > May be null if error is unknown. I am not sure on the reason for the error being unknown - `expo-print` should handle this gracefully though instead of crashing out completely. # Test Plan I have created the following snack (really bad code I know, but demonstrates the idea - in reality I have a multiple print queues that happen to fire at the same time, it seems to happen when printToFileAsync is run twice at once. https://snack.expo.dev/@mat.kastner/recreate-expo-print-crash With `expo-print` version 11.3.0 if you hit the print button multiple times it can crash with a SIGABRT exception on some devices - possibly due to memory limits or cache access issues. When I make the change in this PR locally, the app no longer crashes completely and will reject the promise with the error as expected. To test this, try running the snack on an older device (in my case a Sunmi V2 Pro). # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin).
[expo-print][android] Fix file loading (#13677)# Why Fixes #13560. # How - Fixed copying to output stream bug. - Added promise resolving. # Test Plan - Native component list. # C
[expo-print][android] Fix file loading (#13677)# Why Fixes #13560. # How - Fixed copying to output stream bug. - Added promise resolving. # Test Plan - Native component list. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md).
[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] lint spotless ktlint and fix CI step (#13662)
[android] Add kotlin spotless ktlint linter for bare-expo (#13596)# Why In [#12545](https://github.com/expo/expo/pull/12545) ktlint was added to expo-go, but it didn't work with bare app. # H
[android] Add kotlin spotless ktlint linter for bare-expo (#13596)# Why In [#12545](https://github.com/expo/expo/pull/12545) ktlint was added to expo-go, but it didn't work with bare app. # How 1. Add spotless plugin, configure ktlint in accordance with how it was already implemented in expo-go. 2. Fix current lint errors
[expo-print] Rewriting to kotlin (#13538)# Why Modules written in java are rewritten to Kotlin. # How I generated Kotlin code from Java, fix problems and made code cleaner. # Test Plan
[expo-print] Rewriting to kotlin (#13538)# Why Modules written in java are rewritten to Kotlin. # How I generated Kotlin code from Java, fix problems and made code cleaner. # Test Plan I launched bare expo app and tested print module in different ways. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md).
[android] update base64 decoding options (#7841)* [android] [camera] use .NO_WRAP to encode base64 output * [android] [image-manipulator] use .NO_WRAP to encode base64 output * [android] [ima
[android] update base64 decoding options (#7841)* [android] [camera] use .NO_WRAP to encode base64 output * [android] [image-manipulator] use .NO_WRAP to encode base64 output * [android] [image-picker] use .NO_WRAP to encode base64 output * [android] [print] use .NO_WRAP to encode base64 output * [android] [secure-store] use .NO_WRAP to encode base64 output Co-authored-by: Bartłomiej Bukowski <[email protected]> Co-authored-by: Łukasz Kosmaty <[email protected]>
[android] Multiple Android project fixes (#4795)* [@unimodules/core] Do not try to implement RegistryLifecycleListener in SingletonModule * [tools] Use an explicit argument for ABI version to us
[android] Multiple Android project fixes (#4795)* [@unimodules/core] Do not try to implement RegistryLifecycleListener in SingletonModule * [tools] Use an explicit argument for ABI version to use when transforming react-native code * [tools] Make build-aar script more resilient * [expo-print] Remove obsolete import * [packages] Move all dependencies to api so other libraries can use them * [expo-updates] Add missing import * [expo-module-template] Add missing import * [expotools] Allow adding expokitTag option to android-update-expokit
[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
Fix casting error in expo-print (#3188)* #3162 * Update PrintPDFRenderTask.java
[Android] drop support for Android 4.4 (#2367)
Move universal modules to packages (#2380)* Move modules to packages * Remove unused, old, unmaintained standalone projects * Replace ['"/]modules['"/] with packages * Run pod install afte
Move universal modules to packages (#2380)* Move modules to packages * Remove unused, old, unmaintained standalone projects * Replace ['"/]modules['"/] with packages * Run pod install after regenerating ios files