android - Imports just on API level > 15 -
i have app created on api 8. want make work ics , need additional imports not available in api 8. want add following imports:
import android.provider.calendarcontract; import android.provider.calendarcontract.calendars; import android.provider.calendarcontract.events; so have make diffenent app api > 15? name of app should not change.
or maybe possible place 2 app versions , make minsdkversion , maxsdkversion according api level google play?
how handle that?
i have app created on api 8.
great!
now want make work ics , need additional imports not available in api 8.
no problem! since import statements applied @ compile time, long set project's build target (e.g., project > properties > android) api level 14 or higher, code compile fine.
so have make diffenent app api > 15?
no. use version guard blocks ensure not try using newer code on older devices:
if (build.version.sdk_int>=build.version_codes.ice_cream_sandwich) { // stuff calendarcontract } or maybe possible place 2 app versions , make minsdkversion , maxsdkversion according api level google play?
that should not necessary.
Comments
Post a Comment