What is the use of @RequiresApi(Build.VERSION_CODES.M)
when it is in front of a method?
I need it to call connectivityManager.activeNetwork
What is the use of @RequiresApi(Build.VERSION_CODES.M)
when it is in front of a method?
I need it to call connectivityManager.activeNetwork
To be simple.
For connectivityManage.activeNetwork
minimum required OS for an android is M i.e: Marshmallow.
Your app support lower version that marshmallow but while using connectivityManage.activeNetwork
it will be needing Marshmallow for lower version it doesn't work
if end user has Marshmallow or next versions this code will be executed.