How do I check HoneyComb or higher is running, and accordingly call a method for that Version?

前端 未结 2 435
-上瘾入骨i
-上瘾入骨i 2021-02-08 01:02

For Android Versions 3.0 and higher, I want to call a certain method. Is there a way to check if a certain method is available in the running Android Version?

To be more

2条回答
  •  一整个雨季
    2021-02-08 01:17

    if (Build.VERSION.SDK_INT >= x ) {}
    

    x is the api number, Honeycomb is 11 you can find api numbers here: Platform versions

提交回复
热议问题