Skip to content

[BUG] "Open With" button triggers system Share Sheet instead of File Type Intent #351

@bharatmk2567

Description

@bharatmk2567

Issue Type: 🐞 Bug Report
Component: File Viewer / Android & iOS App


Description

When attempting to open a file (specifically .docx, .pdf, or other document formats) within the Internxt mobile application, the "Open With" action does not function as intended. Instead of invoking a system Intent to display a list of compatible applications capable of editing or viewing that specific file type, the app triggers the generic System Share Sheet.

This prevents users from seamlessly opening files in external editors (like Microsoft Word or Google Docs) and instead forces them to "share" a copy of the file, which breaks the workflow of opening a file for direct interaction.


Expected Behavior

When the "Open With" button is pressed:

  1. The app should trigger a file-type specific Intent (on Android) or Document Interaction Controller (on iOS).
  2. A list of installed applications that support the specific MIME type (e.g., application/vnd.openxmlformats-officedocument.wordprocessingml.document) should be displayed.
  3. Selecting an app from that list should launch the chosen app and pass the file data/URI directly.

Actual Behavior

When the "Open With" button is pressed:

  1. The app opens the standard System Share Sheet (used for sending files via WhatsApp, Email, AirDrop, etc.).
  2. The user is presented with contact shortcuts and social media apps rather than productivity/editor apps.

Steps to Reproduce

  1. Open the Internxt app.
  2. Navigate to any .docx or .pdf file in your cloud storage.
  3. Tap on the file to open the preview or the file options menu.
  4. Locate and tap the "Open With" button.
  5. Observe that the Share Sheet appears instead of the "Complete action using..." app picker.

Technical Context & Suggestions

The current implementation likely uses a generic sharing function (e.g., Share.share in React Native or a standard ACTION_SEND Intent on Android) instead of a View/Edit Intent.

  • For Android: The implementation should use Intent.ACTION_VIEW with the correct setDataAndType set to the file's MIME type and FLAG_GRANT_READ_URI_PERMISSION.
  • For iOS: Ensure UIDocumentInteractionController is used with presentOpenInMenuFromRect rather than UIActivityViewController.

Environment

  • App Version: 1.8.4
  • OS: Android 16
  • Device: Poco F7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions