Problems testing APK expansion library

Viewed 5128

I've integrated the APK Expansion file download library from Google into my project, and it works more or less OK (except a few minor gotchas, which have been reported by others on SO already).

However, I have a hard time testing it. When I was first testing it, I uploaded my signed APK + main expansion file version 1 to Google Play, and it worked well.

However, when I upgraded my application, together with main expansion file version 2, the application could no longer download the file - the library immediately returns with NO_DOWNLOAD_REQUIRED, but the file is not there! I started debugging the LVL check passes, but the downloadable files table was empty! While I was trying to debug the details... it suddenly started to work again!

I assumed this was a sort of temporary glitch and continued my work, just to hit the same issue again, after updating my APK and expansion file again. Application passes the LVL check, but again library assumes there are no files to download.

Is it a known problem with Google's library? Or perhaps I need to wait some time until the files is available on Google's cloud?

EDIT: It just started working OK. It really seems it needs some time for the file to somehow propagate on Google's side. One bad thing about the library is that once it validates the license, it never checks the download list again, so I had to reinstall the app. Weird... Why the heck is it so complex?

4 Answers

If you are using complete code from sample app, have you changed the version code in below piece of code:-

private static final XAPKFile[] xAPKS = {
        new XAPKFile(
                true, // true signifies a main file
                <Version code here>, // the version of the APK that the file was uploaded
                   // against
                49597391L // the length of the file in bytes
        ),

};
Related