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

[android] Add ability to override inferred MIME type when launching Intent #3300

Merged
merged 6 commits into from Jan 25, 2019

Conversation

@rhunt4675
Copy link
Contributor

commented Jan 23, 2019

Why

#1713 adds the ability to launch an intent with a Uri, however it would be nice to be able to explicitly specify a MIME type to accompany the Uri with setDataAndType (Android tries to infer the MIME type based on the Uri but it is not always correct). This addresses an existing feature request.

How

Added parameter to startActivity based on guidance from #1713. Caller can ignore new parameter to retain existing behavior. Planning to update the SDK once changes are merged.

@rhunt4675 rhunt4675 changed the title Add ability to override inferred MIME type when launching Intent [android] Add ability to override inferred MIME type when launching Intent Jan 23, 2019

@sjchmiela sjchmiela self-requested a review Jan 23, 2019

@sjchmiela

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2019

Hey, @rhunt4675! Thank you for your contribution! For the PR to be "ready to be merged", a couple of more places in the project will have to be adjusted to this change. 🙂

Let me know if you have any questions!

rhunt4675 added 2 commits Jan 23, 2019
@rhunt4675

This comment has been minimized.

Copy link
Contributor Author

commented Jan 23, 2019

Oops, you're absolutely right! I was planning to make those changes to the expo-sdk repo, but didn't notice that it had been deprecated.

Thanks for the quick feedback. I believe I made the necessary changes, but let me know what else I can do to improve my PR.

@sjchmiela
Copy link
Contributor

left a comment

Thank you for this contribution! I left one small suggestion. 🙂 Could you also please add a CHANGELOG entry under masterNew features? Apart from that everything looks 💯!

docs/versions/unversioned/sdk/intent-launcher.md Outdated Show resolved Hide resolved
@sjchmiela

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

Also added suggestions to reformat types from _string_ to:

`string`

It looks like Markdown compiler can't handle _{ [key: string]: any }_ properly which is why docs CI failed (so my suggestion is to replace all _type_ with backticks and call it a day. 🙂

sjchmiela and others added 3 commits Jan 25, 2019
Use backticks for styling TS types in docs
Co-Authored-By: rhunt4675 <rhunt4675@users.noreply.github.com>
@rhunt4675

This comment has been minimized.

Copy link
Contributor Author

commented Jan 25, 2019

@sjchmiela Yep thanks! That fixed the docs CI checks. Let me know what else I can do to improve the PR.

@sjchmiela
Copy link
Contributor

left a comment

Looks great to me, thank you for your contribution!

@sjchmiela sjchmiela merged commit 8d0a532 into expo:master Jan 25, 2019

2 of 3 checks passed

client Workflow: client
Details
docs Workflow: docs
Details
sdk Workflow: sdk
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.