相关疑难解决方法(0)

How to Use Unsupported Exception for Lower Platform Version

I have a DialogFragment that handles login and fingerprint authentication for my application. This fragment uses two classes that are exclusive to API 23, KeyGenParameterSpec and KeyPermanentlyInvalidatedException. I had been under the impression that I could use these classes, as long as I check the build version before I try to initialize the classes (outlined here):

if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    ...
} else {
    ...
}
Run Code Online (Sandbox Code Playgroud)

But it appears that this is not the case. If I try …

android dalvik android-version android-api-levels android-fingerprint-api

13
推荐指数
2
解决办法
2306
查看次数