I am trying to perform an APKExpansionPolicy
check so I can get the URL of the file to download for a custom download. I put up my APK, left it in the unpublished state, uploaded an expansion file, and then test with the emulator to do the LVL call. It returns (no errors) and when i change the options in the google play testing section to always return valid, or false, i see those results as expected. But every time, no matter what I do, the extra strings (url, filename) are not filled in (null).
I'm wondering if I'm trying to do something in the emulator that it just doesn't do. I have also tried different versions of emulator 2.3.3, 4.0, with the same results.
private class MyLicenseCheckerCallback implements LicenseCheckerCallback {
public void allow(int reason) {
if (isFinishing()) {
// Don't update UI if Activity is finishing.
return;
}
// Should allow user access.
String url = policy.getExpansionURL(APKExpansionPolicy.MAIN_FILE_URL_INDEX);
String expansionFileName = policy.getExpansionFileName( APKExpansionPolicy.MAIN_FILE_URL_INDEX );
long expansionFileSize = policy.getExpansionFileSize( APKExpansionPolicy.MAIN_FILE_URL_INDEX );
}