Skip to content

Report content types more clearly (Android and iOS) #291

Open
@lindboe

Description

@lindboe

We need to be able to easily differentiate the type of data being shared so we can handle different cases. A few issues are enumerated below; these are combined into one issue so that if we need to introduce an API change on the JS side, we can ensure both iOS and Android can provide the same data.

Issues:

  1. We found that mime types were not being correctly detected for files shared from the Files app on iOS. We have an existing fix (Update ShareMenuReactView to better handle file url's #270) that we believe works, but needs testing once we've addressed Ensure iOS share extension can load files of all types, from all apps #290.
  2. Some recent attempts at Android testing provided a content:// url, with no file name or extension, instead of a file URL that did include that information. Expensify needs this information for its functionality (displaying the filename, as well as not allowing SmartScan if the file is not compatible), and this will be easiest to implement in native code.
  3. Mime type is not always sufficient information for being able to distinguish content types. For example, a highlighted text string, a shared web page, and a text file would all currently have a mime type of text/plain, and to distinguish between those items, we'd have to employ a heuristic in JS to "guess" what type of value we've received. Let's explore if there are native tools we can use to provide more information about the content that was shared.

In scope:

  • Test the existing PR with a variety of file types in a variety of apps, both in the simulator and on-device

Out of scope:

  • Testing with more than one file

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