Hi Nick,
The SDK comes bundled with the newest Play services. So if you are compiling your app against the latest Play services library (that you specified in your Gradle dependency), you can simply check for its version, and there goes your SDK version.
I'm using the
GoogleApiAvailability class from the Play services library to retrieve the version code, so I removed the "ads" portion from my dependency to make it more inclusive (i.e.
compile 'com.google.android.gms:play-services:8.4.0'):
int playServicesVersion = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_VERSION_CODE;
returns
8487000
since I'm compiling against v.8.4.0.
Other than that, we currently don't expose an explicit API call for the SDK itself.
Vu Chau
Mobile Ads SDK Team