Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lindboe opened this issue Dec 6, 2023 · 0 comments
Open

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

lindboe opened this issue Dec 6, 2023 · 0 comments

Comments

@lindboe
Copy link

lindboe commented Dec 6, 2023

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
@lindboe lindboe changed the title Fix mimetype detection on iOS Fix mime-type detection on iOS Dec 6, 2023
@lindboe lindboe mentioned this issue Dec 6, 2023
21 tasks
@lindboe lindboe changed the title Fix mime-type detection on iOS Report content types more clearly (Android and iOS) Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant