You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
The @TargetAPI annotations just hide things from Lint and create spaghetti code. Either something works for the supported API range or it doesn't. For more background see this issue from the Raster SDK.
Here's an updated API Market Share report from the Android Dashboard. Based on this I think we should definitely drop Froyo and possibly drop Gingerbread. Ice Cream Sandwich was a major change UI wise as well as some updates to core UI classes (like View) and Input handling.
If we kept Gingerbread and up that would put the minimum at API 10 / 11. If we kept Ice Cream Sandwich and up that would put the minimum at API 14. Thoughts @ljbade@incanus?
The trend is that Google is moving to an annual Android OS release cycle like Apple does with iOS, and then updates it's own apps / services via Google Play Services whenever it wants / needs to.
Based on the marketshare numbers above and running lint on the MapboxGLAndroidSDK doesn't trip on any API range specific things for now, let's go to API 10 as a floor. More importantly though, let's also remove all @TargetAPI annotations (and promise not to use them in the future!). Lint is your friend.
I raised the Minimum SDK to 10, removed the @TargetAPI suppression annotations, and then ran Lint. Here are the results:
Overall Results
First API Version Violation
Second API Version Violation
The 2 API Version Violations are related. I'll investigate to see if there's a way around them so that the SDK will truly be API 10 and above for support.
@bleege Does linter also catch issue with external libs/jars? For e.g. would an issue like #2009 be caught by linter?
I noticed a potentially similar issue when trying to do a proguard enabled build. It looks like OkHttp has a transitive dependency on java.lang.ReflectiveOperationException which was added in Api Level 19 (Related issue #2130).
Activity
[-]Remote TargetAPI Annotations[/-][+]Remove TargetAPI Annotations[/+]ljbade commentedon Mar 2, 2015
Well we can remove them and make API level errors warning instead, but then I won't be at zero errors/warnings again.
Perhaps we just drop support for Android 2.x completely?
bleege commentedon Mar 2, 2015
That's a good thing! It means that the stuff to fix is visible and not hiding waiting for the most inopportune time to cause trouble. :-)
API 8 would probably be okay to drop, but there are still a healthy sliver of API 10 devices around.
bleege commentedon Aug 13, 2015
Here's an updated API Market Share report from the Android Dashboard. Based on this I think we should definitely drop Froyo and possibly drop Gingerbread. Ice Cream Sandwich was a major change UI wise as well as some updates to core UI classes (like View) and Input handling.
If we kept Gingerbread and up that would put the minimum at API 10 / 11. If we kept Ice Cream Sandwich and up that would put the minimum at API 14. Thoughts @ljbade @incanus?
incanus commentedon Aug 13, 2015
Weird that Gingerbread has more than ICS. Is there a good rationale for that?
Also, maybe dates here would be useful as we think about how old particular releases matter (though I realize market share is more important).
mb12 commentedon Aug 13, 2015
Maybe that's because all carriers push at least one OS upgrade. Majority Froyo device got upgraded to Gingerbread and ICS to Jellybean.
bleege commentedon Aug 19, 2015
According to Wikipedia's Android Version History here's how things break out:
The trend is that Google is moving to an annual Android OS release cycle like Apple does with iOS, and then updates it's own apps / services via Google Play Services whenever it wants / needs to.
Based on the marketshare numbers above and running
linton the MapboxGLAndroidSDK doesn't trip on any API range specific things for now, let's go to API 10 as a floor. More importantly though, let's also remove all@TargetAPIannotations (and promise not to use them in the future!). Lint is your friend.ljbade commentedon Aug 20, 2015
Hmm OK lets remove the annotations, and just live with the warnings about using newer functions even though we have version check?
Also I think I might have to look at the memory cache size tuning, currently using function that only exists in API 16 for that.
#934 - Raising Min SDK to API 10
bleege commentedon Aug 20, 2015
I raised the Minimum SDK to 10, removed the
@TargetAPIsuppression annotations, and then ran Lint. Here are the results:Overall Results
First API Version Violation
Second API Version Violation
The 2 API Version Violations are related. I'll investigate to see if there's a way around them so that the SDK will truly be API 10 and above for support.
mb12 commentedon Aug 20, 2015
@bleege Does linter also catch issue with external libs/jars? For e.g. would an issue like #2009 be caught by linter?
I noticed a potentially similar issue when trying to do a proguard enabled build. It looks like OkHttp has a transitive dependency on java.lang.ReflectiveOperationException which was added in Api Level 19 (Related issue #2130).
15 remaining items
ljbade commentedon Aug 21, 2015
@bleege For a while I has been thinking we should support only API 15 / Android 4.x and above.
Reasons:
ljbade commentedon Aug 21, 2015
@bleege - the compass lint error, this should be fixed when we get some nice material design artwork for it, with correct densities
[android] Use hardware layer for compass fade
ljbade commentedon Oct 25, 2015
EDIT: moving to the right issue #2784
mapbox#934 - Raising Min SDK to API 10
mapbox#934 - Setting SDK Minimum to API 15. Removing TargetApi Annota…
mapbox#934 - Consolidating CallbackHandler due to API minimum being a…
mapbox#934 - Removing duplicate compass.png file and centralizing in …
mapbox#934 - Removing onLocationChanged() log statement
Increased size of markers and added additional options for configurin…
Removed the long press gesture recognizer in favor of a custom zero-d…