Is there a way for an Android app to determine its target API level? (Particularly in the case of a JAR library, which cannot influence which apps it is embedded in, while app developers may not be able to change the code of the JAR.)
Asked
Active
Viewed 179 times
1 Answers
2
For a given context
, call:
context.getApplicationInfo().targetSdkVersion
Same for minSdkVersion
, which will give you the minimum SDK version.

user149408
- 5,385
- 4
- 33
- 69