to suppress API level warning, I usually prefer to use @RequiresApi
, than @TargetApi
.
As, @RequresApi
seems newer and better than @TargetApi
, according to RequiresApi vs TargetApi android annotations
But, is there any real use case, where we can solve using @RequiresApi
, but not using @TargetApi
?