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

Bumped targetSdkVersion and compileSdkVersion #3357

Merged
merged 3 commits into from
Oct 1, 2019

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Sep 20, 2019

Closes #3189

What has been done to verify that this works as intended?

I investigated the doc:
https://developer.android.com/about/versions/pie/android-9.0-changes-28
https://developer.android.com/about/versions/pie/android-9.0-changes-all
https://developer.android.com/about/versions/10/behavior-changes-10
https://developer.android.com/about/versions/10/behavior-changes-all

also, I tested the app a bit:

  • downloading forms
  • uploading forms (aggregate and google sheets)
  • filling forms

Why is this the best possible solution? Were any other approaches considered?

We just have to update targetSdkVersion to 28 so we decided to update to 29 to test everything just once.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

I wasn't able to find anything apart from the issue with TimeWidget but it doesn't mean that it's the only problem. Bugs might be everywhere...

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010
Copy link
Member Author

grzesiek2010 commented Sep 20, 2019

There is still a question I asked on slack about minSdkVersion now it is 16 and the range is pretty wide 16-29.
Based on firebase I can say that Android 4.x (all versions) is ~8% off all.
Maybe it's time to bump minSdkVersion as well? Users with Android 4 still would be able to use v1.23.

@@ -218,8 +218,7 @@ public void setTitle(CharSequence title) {
*/
@SuppressWarnings("deprecation")
private void fixSpinner(Context context, int hourOfDay, int minute, boolean is24HourView) {
// android:timePickerMode spinner and clock began in Lollipop
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you determine this is now only relevant for N?

I think the block in https://github.com/opendatakit/collect/blob/4eb3b2b1d7be3e62ae249e450c526a0673d5b40b/collect_app/src/main/java/org/odk/collect/android/widgets/TimeWidget.java#L253 should also be updated accordingly since that test doesn't make sense anymore.

Copy link
Member Author

@grzesiek2010 grzesiek2010 Sep 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you determine this is now only relevant for N?

The gist you have used is also updated in the same way: https://gist.github.com/jeffdgr8/6bc5f990bf0c13a7334ce385d482af9f

and also in https://issuetracker.google.com/issues/37119315 you can find that it's fin in API 25

I think the block in should also be updated accordingly since that test doesn't make sense anymore.

right.

@lognaturel
Copy link
Member

I see @opendatakit/testers are in favor of limiting the API level range! It's true that it would be really nice. It's the kind of decision that is major enough that the TSC should consider it and that the community should be told a bit ahead. That means it's definitely not going to be for v1.24.

@grzesiek2010
Copy link
Member Author

grzesiek2010 commented Sep 24, 2019

Ahhh I missed one page, maybe even the most important one since is related to our app most:
https://developer.android.com/about/versions/10/privacy/changes
today I tested emulator with android Q and bumping to 29 will require more changes for devices with Android Q, I know that it's probably not used much now but still.
Two most important changes we will need to implement are:

It's not something super simple so I would vote for bumping to 28 (the upcoming release) and then to 29.

@grzesiek2010
Copy link
Member Author

@mmarciniak90 I did a rebase so that it includes the fix for #3362

@mmarciniak90
Copy link
Contributor

I couldn't find a bug in this PR but I noticed 3 other bugs during testing this issue.

I also confirm that this doesn't mean that fix is without problems so it will be better to merge it and have the opportunity to work with these changes all the time.

Verified on Android: 4.2, 4.4, 5.1, 6.0, 7.0, 8.1, 9.0

Verified cases:

  • All widgets form
  • Google Maps, Mapbox map
  • Upgrade
  • Light/Dark mode
  • Get a new form from Google Drive and Aggregate
  • Autosend, autodelete - Google Drive and Aggregate - success and fail

@opendatakit-bot unlabel "needs testing"
@opendatakit-bot label "behavior verified"

@lognaturel lognaturel merged commit bcc613b into getodk:master Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App updates must target Android 9 (API 28) by November 2019
4 participants