Calling API from higher API level than the minimum requirement

前端 未结 3 1461
清歌不尽
清歌不尽 2021-01-23 05:22

I wrote most of an app just fine with min API level set to 7. I want to call a single API from level 8. Users with lower versions of android will survive without this \"extra fe

3条回答
  •  广开言路
    2021-01-23 06:05

    Your app will crash if you do not have an if statement to check API in order to ignore it if API == 7. I was working with 4.0 to 4.2 devices and did some testing with the Airplane mode, which in API 4.1 and below is found in Settings.System but in 4.2 it is under Settings.Global. If I tried calling the wrong one the app would crash.

提交回复
热议问题