Will this line be ignored?
Not.
Can my application crash?
Spectactularly .: -)
Will the application be filtered on Google Play so that they cannot install?
Not.
I would like this single line to be ignored on lower devices.
You have two problems:
Use @TargetApi(...) instead of @SuppressLint("NewApi") , where ... is the name (for example, FROYO ) or the number (for example, 8 ) of the code that your method refers to.
But before you do this, wrap your infringing lines in a check to see if they should run on this device:
if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.FROYO) { // then execute your code that requires API Level 8 } // optional else block if you have some workaround for API Level 7
Your if check will cause your line to be eliminated. Your @TargetApi annotation @TargetApi cause Lint to stop yelling at you about referencing a class or method too new.
source share