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/deps: compileSdkVersion to 33 (Android 13); image-picker to 4.10.2 #5618

Merged
merged 2 commits into from
Dec 16, 2022

Conversation

chrisbobbe
Copy link
Contributor

@chrisbobbe chrisbobbe commented Dec 16, 2022

Planned followup to #5543; see #5543 (comment).

I got no build failures, and there were no image-rotation issues with images from the camera or library; tested on my iPhone and the office Android device.

Images on iOS continue to be inflated 3x or 4x; see a summary of that situation at #5543 (review). The RN issue seems to be facebook/react-native#33760.

@chrisbobbe chrisbobbe added the dependencies Pull requests that update a dependency file label Dec 16, 2022
@chrisbobbe chrisbobbe requested a review from gnprice December 16, 2022 01:39
….10.2

Seems like react-native-image-picker made it *possible* to build on
the new SDK in the same commit where they made it *necessary* to do
so, which was a bad choice:
  zulip#5543 (comment)

So, shove the sdk bump and this image-picker upgrade together into
one commit.

Anyway, as Greg said in his draft of the compileSdkVersion bump,
f5c90ec:

  This version is out; time to start using it in the build.

  This setting is not to be confused with the targetSdkVersion. The
  latter goes into the built manifest, and affects a wide range of
  behavior, so bumping it requires careful testing. This is used
  purely at build time, and should have no effect on runtime
  behavior.

  Its main effect is that it become possible for code to
  conditionally use new API features.  It also brings new compiler
  warnings -- hence the pair of library updates preceding this.

We take the latest image-picker version, but in particular at least
4.10.1, to get a bugfix for an image-orientation issue:
  react-native-image-picker/react-native-image-picker#2036
that was reportedly introduced in 4.8.5:
  react-native-image-picker/react-native-image-picker#2022
@gnprice
Copy link
Member

gnprice commented Dec 16, 2022

Thanks for taking care of this!

It looks like that upstream PR to fix the image-rotation issue, discussed at #5543 (comment) , got merged and released. Glad that saves us here from running the PR version directly.

Looks good; merging.

@gnprice gnprice force-pushed the compile-sdk-image-picker-bumps branch from d4ce6bf to fc2dab7 Compare December 16, 2022 02:08
@gnprice gnprice merged commit fc2dab7 into zulip:main Dec 16, 2022
@chrisbobbe chrisbobbe deleted the compile-sdk-image-picker-bumps branch December 16, 2022 02:09
@chrisbobbe
Copy link
Contributor Author

It looks like that upstream PR to fix the image-rotation issue, discussed at #5543 (comment) , got merged and released. Glad that saves us here from running the PR version directly.

Yeah, glad for that. Thanks for the review!

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Aug 21, 2023
This change will be required in order to upload new releases to the
Play Store, effective 2023-08-31 (or 2023-11-01 if we request an
extension).

This change causes Android 13 and later to apply to our app a number
of behavior changes introduced in that version, documented here:
  https://developer.android.com/about/versions/13/behavior-changes-13

The "Granular media permissions" section stood out as potentially
relevant -- until we remembered that, in PR zulip#5618, we upgraded
react-native-image-picker such that on Android 13+ we use Android's
PhotoPicker API. With that API, the app learns about just the images
that the user selects, in a separate media picker, so our app code
doesn't need direct access to whole lists of media created by other
apps. That's what this note in that section of the doc is about:

> Note: If your app only needs to access images, photos, and videos,
> consider using the photo picker instead of declaring the
> READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions.

Fixes: zulip#5453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants