in my code i'm using the a function with "query text change" but it's only supported from android 11 this is a simple search bar. how to verify the current version of android, and show a different activity? thanks!
in my code i'm using the a function with "query text change" but it's only supported from android 11 this is a simple search bar. how to verify the current version of android, and show a different activity? thanks!
There are many questions about that. Check Get Android API level of phone currently running my application and Programmatically obtain the Android API level of a device? . In these answers, you might see something like:
But
.SDK
has been deprecated. UseSDK_INT
insteadSee Build.VERSION.html#SDK_INT for more.
Update:
As kcoppock has nicely suggested, you may want to use something like: