Higher API calls when lower SDK targeted

后端 未结 3 756
既然无缘
既然无缘 2020-12-17 18:23

My app supports minSdkVersion=10 and targeting 16. I want to call methods specific to API level >= 14 if a specific device supports them. I could check running OS version at

3条回答
  •  心在旅途
    2020-12-17 18:41

    In addition of checking the current version you should also add @SuppressLint("NewApi")to your method so the compiler want yell about it.

提交回复
热议问题