Description
When tapping an email attachment (or file in Files view) on Android, the application opened the system Share sheet ("Partager avec...") instead of opening the file directly in a default viewer application (such as PDF Viewer, Gallery, Video Player, or Document Viewer).
Root Cause
shareAttachment in src/lib/email-export.ts called Sharing.shareAsync.
- On iOS,
Sharing.shareAsync opens QuickLook preview directly.
- On Android,
Sharing.shareAsync opens Intent.ACTION_SEND (Share sheet), asking where to share/send the file instead of viewing it.
Fix
On Android, shareAttachment now converts the file URI to a content:// URI using FileSystemLegacy.getContentUriAsync and launches android.intent.action.VIEW via expo-intent-launcher. If no viewer app handles the file format on the device, it falls back gracefully to Sharing.shareAsync.
Description
When tapping an email attachment (or file in Files view) on Android, the application opened the system Share sheet ("Partager avec...") instead of opening the file directly in a default viewer application (such as PDF Viewer, Gallery, Video Player, or Document Viewer).
Root Cause
shareAttachmentinsrc/lib/email-export.tscalledSharing.shareAsync.Sharing.shareAsyncopens QuickLook preview directly.Sharing.shareAsyncopensIntent.ACTION_SEND(Share sheet), asking where to share/send the file instead of viewing it.Fix
On Android,
shareAttachmentnow converts the file URI to acontent://URI usingFileSystemLegacy.getContentUriAsyncand launchesandroid.intent.action.VIEWviaexpo-intent-launcher. If no viewer app handles the file format on the device, it falls back gracefully toSharing.shareAsync.