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

Support lowering minSDK upto 16 for Android #2

Merged
merged 1 commit into from
Aug 30, 2020

Conversation

sarbagyastha
Copy link
Contributor

Used v1.1.0-alpha01 of androidx.media2.session, as it supports lowering minSDK upto 16.

@ryanheise
Copy link
Owner

Thanks for this PR. My personal inclination is that it is time to bump up the minSdkVersion, and I take Google's own decision to set the minSdkVersion for the "support" libraries to level 19 as a strong indication that it is time to move on. This level essentially gives a market share of 98.1%. Lowering this to level 16 adds an additional 1.7%, but it also means using an alpha version of the support library, and I'm not sure if I'm convinced yet whether that is a good idea.

However, I would be interested to hear your thoughts. Where do you draw the line on the minSdkVersion? Today, level 16 would give you a coverage of 99.8%. I have never before seen a default setting in Android Studio for minSdkVersion give a coverage this high, and I suspect they just forgot to update it for a while, whereas the support libraries have already moved on.

@ryanheise
Copy link
Owner

I would now like to present a counter argument to myself ;-)

I think this pull request couldn't hurt, and it would almost certainly make things easier for most people. It is very unlikely that the alpha status of this version of the support library will cause any issues given the part of the library that I am using doesn't do anything fancy.

My inclination may have changed to favour moving to this alpha version.

@ryanheise ryanheise merged commit 109877b into ryanheise:master Aug 30, 2020
@ryanheise
Copy link
Owner

Merged, and that resolves the little debate I had with myself :-)

@sarbagyastha
Copy link
Contributor Author

sarbagyastha commented Aug 30, 2020

@ryanheise , just found out that this PR is causing issue with audio_service as the MediaControllerCompat in androidx:media is throwing RemoteException only for API>=21. But this seems to have been fixed since v1.2.0.

@ryanheise
Copy link
Owner

Thanks for catching that, I'm happy to accept another PR if you would like?

@ryanheise
Copy link
Owner

I've just had a chance to test this, and I see what you're referring to. I can change the audio_service code to catch Exception rather than RemoteException and that should prevent the error.

Although it would be good at some point to upgrade the media2 library.

@ryanheise
Copy link
Owner

audio_service 0.14.1 has been released which should fix this compatibility issue. Let me know how it goes for you.

@sarbagyastha
Copy link
Contributor Author

Thanks for the update @ryanheise. It's working great now.

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

Successfully merging this pull request may close these issues.

2 participants