-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Update Android targetSdkVersion to 29 (Android 10), by 2020-11 deadline #3665
Comments
The Play Console has started showing me a warning when I upload a new release; first saw it today with the 27.154 release (now in beta). Following some links, the deadline is 2020-11-02. (I'll edit the description with more info.) |
Bumped the priority, as this deadline is getting sooner. |
Here's notes from reading through that list of behavior changes triggered by actually bumping the targetSdkVersion. I intend to update this as I learn more.
New features to possibly use, learned incidentally in this process:
|
OK, I've now completed the steps of this that are about reading through the documentation. The results are expanded out into the checklist in the preceding comment. Almost all those items are checked off, but there are a couple of them remaining that correspond to deeper investigation and/or testing. Here's a fresh task list, covering those remaining items above and zooming back out to the overall issue as set out in the description:
|
This change will be required in order to upload new releases to the Play Store, effective 2020-11-01, a couple of weeks from now. The change causes Android 10 and later to apply to our app a number of behavior changes introduced in that version, documented here: https://developer.android.com/about/versions/10/behavior-changes-10 After reading carefully through that documentation, I believe we can rule out almost all the changes as possibly affecting us: zulip#3665 (comment) and it seems likely that the remaining don't either. We'll do some testing to try to determine that too. Fixes: zulip#3665
Hmm, well -- I get this error modal: Specifically, my steps were:
Then:
So it seems there is some problem. It may not be the Hmm, thinking some more, ISTR that the library we use for getting images from the camera ( So that's a potential lead for investigation; if that's what's happening, we'll want either a newer version of this library, or some other library if it's effectively unmaintained and has no such version, or some other solution. |
Well, here's a sad but adequate workaround for the camera issues: --- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -25,2 +25,3 @@
- android:theme="@style/AppTheme">
+ android:theme="@style/AppTheme"
+ android:requestLegacyExternalStorage="true">
<activity That fixes the trouble mentioned in my previous comment, and also a related issue that appears when trying to pick an existing image. It's a temporary solution -- effectively it opts out of this aspect of the effects of targeting Android 10, and when in the future we target Android 11 the opt-out will be ignored. But it's enough to unblock this for now. I'll file a separate issue for the follow-up, with what I learned from investigating this today. |
This opts out of Android 10's new "scoped storage" model. Docs: https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage The new model otherwise takes effect on Android 10+ devices when targeting Android 10. We're about to start targeting Android 10 (zulip#3665), because Google Play will require us to do so starting on 2020-11-02, which is soon. The opt-out will stop having any effect on Android 11+, when we eventually target Android 11+. So effectively it gives us an extension of one more cycle on adapting to the new model. The reason we're opting out is that at least one of our dependencies, the react-native-image-picker library which we use for taking photos and also picking existing photos to share on Zulip, hasn't yet adapted to work properly with scoped storage; if you try doing so in a Zulip that targets Android 10 but doesn't have this change, you just get an error. Details here: zulip#3665 (comment)
After the issues with react-native-image-picker described in the previous two comments (affecting both the take-photo and upload-existing-photo features, behind the "camera" and "photo" icons in the compose menu) where it hasn't adapted to the new "scoped storage", I tested out the other feature that seemed likely to be affected by scoped storage: the upload-file feature, behind the "document" icon. That one, happily, seems to work just fine when targeting Android 10 aka API 29, without needing the |
This opts out of Android 10's new "scoped storage" model. Docs: https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage The new model otherwise takes effect on Android 10+ devices when targeting Android 10+. We're about to start targeting Android 10 (zulip#3665), because Google Play will require us to do so starting on 2020-11-02, which is soon. The opt-out will stop having any effect on Android 11+, when we eventually target Android 11+. So effectively it gives us an extension of one more cycle on adapting to the new model. The reason we're opting out is that at least one of our dependencies, the react-native-image-picker library which we use for taking photos and also picking existing photos to share on Zulip, hasn't yet adapted to work properly with scoped storage; if you try doing so in a Zulip that targets Android 10 but doesn't have this change, you just get an error. Details here: zulip#3665 (comment)
This change will be required in order to upload new releases to the Play Store, effective 2020-11-01, a couple of weeks from now. The change causes Android 10 and later to apply to our app a number of behavior changes introduced in that version, documented here: https://developer.android.com/about/versions/10/behavior-changes-10 After reading carefully through that documentation, I believe we can rule out almost all the changes as possibly affecting us: zulip#3665 (comment) except for one -- "scoped storage" -- and it seems likely that the remaining don't either. We've opted out of scoped storage for now, in the previous commit. We'll want to thoroughly test a beta version with this change before shipping it broadly, to try to catch any remaining issues. Fixes: zulip#3665
This opts out of Android 10's new "scoped storage" model. Docs: https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage The new model otherwise takes effect on Android 10+ devices when targeting Android 10+. We're about to start targeting Android 10 (zulip#3665), because Google Play will require us to do so starting on 2020-11-02, which is soon. The opt-out will stop having any effect on Android 11+, when we eventually target Android 11+. So effectively it gives us an extension of one more cycle on adapting to the new model. The reason we're opting out is that at least one of our dependencies, the react-native-image-picker library which we use for taking photos and also picking existing photos to share on Zulip, hasn't yet adapted to work properly with scoped storage; if you try doing so in a Zulip that targets Android 10 but doesn't have this change, you just get an error. I've filed zulip#4283 with details of the issue and what needs to be done to properly fix it.
The next round after #3563 (and #3075). We should update our
targetSdkVersion
to 29, aka Android 10.Deadline is 2020-11-02. But we could do this any time (indeed could have as soon as Android 10 was out last year), and in any case filing an issue to give us a place to track tidbits we learn.
The important steps for this upgrade are:
targetSdkVersion
.Specific tidbits we've learned:
targetSdkVersion
of 29 or greater prevents using it.The text was updated successfully, but these errors were encountered: