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

Make the min Android API visible on the ReadMe #538

Closed
william-ferguson-au opened this issue Jun 20, 2022 · 4 comments
Closed

Make the min Android API visible on the ReadMe #538

william-ferguson-au opened this issue Jun 20, 2022 · 4 comments

Comments

@william-ferguson-au
Copy link
Contributor

It would be really useful if the min version of the Android API required for the Autobahn release was prominently displayed on the ReadMe.

I just spent several hours upgrading from the 2014 version of Autobahn to get killed by the Android 24 min API.

@william-ferguson-au
Copy link
Contributor Author

Near as I can tell

  • WebSocket needs a min version of 19
  • WAMP needs a min version of 26
  • XBR needs a min version of 24 (except that is depends on WAMP)

Might be a good a idea to split it into 3 modules.

@oberstet
Copy link
Contributor

oberstet commented Jun 20, 2022

as far as I can see, the min version in the build files (that is the version that has direct technical effect) is 24

minSdkVersion 24

so I'm a bit puzzled by what you seem to hint at with "WAMP needs a min version of 26" ..


further, "prominently displayed on the ReadMe.": this would result in numbers in locations that need to be kept manually in sync. I'd rather just link into the respective line in build.gradle ...


Might be a good a idea to split it into 3 modules.

why? that sounds like work;) just buying a newer phone is easier

@william-ferguson-au
Copy link
Contributor Author

The minSdkVersion that you declare in the Autobahn build.gradle is just what you declare as the min version required by the library. It's impact is that it forces clients to either upgrade their minSdkVersion to match, explicitly ignore the version declared by Autobahn, or use another library.

It doesn't guarantee that Autobahn actually conforms to that minimum.
But it does allow you to easily check when building Autobahn for any code that exceeds that min SDK using the Gradle lint task.

And when you do you will see that the ArgumentUnpacker class has 3 uses that require 26.
Hence WAMP needs 26.

Recommend you start using the @RequiresApi annotation to mark out sections where you step up an API so that users of the library at least get compilation warnings when they try and use the parts beyond what they are configured for.

As to why split it into 2 or 3 modules:

  • We have about 3000 devices in the field using the library for which just buying a new phone isn't easier or affordable.
  • By splitting into modules that are more self contained you provide an easier to understand API (why conflate WAMP and WebSocket?) and the min API for each would be documented in the build gradle so you wouldn't have multiple places to maintain.

@oberstet
Copy link
Contributor

The minSdkVersion ..

yes, I understand that

And when you do you will see that the ArgumentUnpacker class has 3 uses that require 26.

ok, fixed that!

As to why split it into 2 or 3 modules:

sure. however, still, that's work to do for a goal I don't care about: Autobahn was created for WAMP, and it was just the case at that time that there wasn't any WebSocket library at all for Android, so I implemented WebSocket in Autobahn as well ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants