I have developed an Android application build using API 13 and min-sdk also API 13. I want to incorporate the swiping across the tabs, and for the purpose I am using v4 support library.
I have following questions,
v4 Support Libraries – These libraries are designed to be used with Android 2.3 (API level 9) and higher. – Vadik. Jun 5, 2017 at 13:20. 1. And v7 Support Libraries – There are several libraries designed to be used with Android 2.3 (API level 9) and higher.
For question 1:
as @StinePike said, depending on what you use as minimum, you should use v4 for min-sdk = 4-12 if your min sdk is >=13 its ok to use v13.
Update As stated by Frank in the comments, with revision 26.0.0 and above the minsdk for all support libraries is API level 14. See https://developer.android.com/topic/libraries/support-library/index.html#api-versions for more details.
For question 2: the best target depends on what you plan to do, if you want to provide some features that were introduced in a higher sdk level, you have to use higher target-sdk but make sure that you check the android version to not use android apis that are introduced in a higer sdk version on a device with an older android version
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// safe to use api 11 / Android 3.0 stuf
} else {
// only use api level <= 10 stuff
}
for min-sdk its the same. if you require stuff of api level >= 10 you have to use min-sdk 10
My opinion: don't use api level < 10, its not worth it... with 10 you reach 90% of the android devices
My opinion (as of April 2016): don't use api level < 16, its not worth it... with 16 you reach ~95% of the android devices
For checking the distribution of android OS version check: https://developer.android.com/about/dashboards/index.html
from the developer site you can find
Note: The Support Package includes more than one support library. Each one has a different minimum API level. For example, one library requires API level 4 or higher, while another requires API level 13 or higher (v13 is a superset of v4 and includes additional support classes to work with v13 APIs). The minimum version is indicated by the directory name, such as v4/ and v13/.
I think that clearly answer your question. If you want to support lower os version ( 4 or higher) and the v4 library apis fullfill your target then use it else use v13
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With