People can't download our specific product in Android Market

前端 未结 2 527
不知归路
不知归路 2020-12-10 00:09

We\'ve recently released our game onto Android Market but are suffering from a major issue. We are getting emails and bug reports from people all over the world that they ar

相关标签:
2条回答
  • 2020-12-10 00:35

    It's 47MB! Here's what my Samsung Galaxy S says:

    D/DownloadManager( 2973): download aborted - not enough free space in internal storage
    D/vending ( 6634): [174] DownloadManagerBroadcastReceiver.handleDownloadCompletedAction(): Got a download completed intent.
    I/vending ( 6634): [174] DownloadManagerBroadcastReceiver.startNextDownload(): Found Paused URI null
    I/vending ( 6634): [174] DownloadManagerBroadcastReceiver.startNextDownload(): No more paused downloads.
    I/vending ( 6634): [174] DownloadManagerBroadcastReceiver.getDownloadStatus(): Unexpected status from download - 498
    W/vending ( 6634): [174] DownloadManagerBroadcastReceiver.handleDownloadCompletedAction(): Couldn't find pathname for completed download URI
    : content://downloads/download/188 -- assuming the download failed.
    D/vending ( 6634): [174] LocalAssetDatabase.notifyListener(): 9122500792911627655 / DOWNLOAD_FAILED
    E/DataRouter( 2577): [*] Received suspend/ resume event but DUN is not up so neglect
    

    Not enough internal storage space, unsurprisingly.

    What is your installLocation set to? Should be preferExternal (see http://developer.android.com/guide/topics/manifest/manifest-element.html#install)

    ADDED LATER

    Hoo boy, this sucks...

    You can browse the source code for Android's download manager here: http://www.google.com/codesearch/p?hl=en#UMpkw0xvvPU/src/com/android/providers/downloads/Helpers.java

    Extrapolating a bit you can do what it does to find out how much space is left in the download cache directory:

    File base = Environment.getDownloadCacheDirectory();
    long bytesAvailable = getAvailableBytes(base);
    
    public static long getAvailableBytes(File root) {
        StatFs stat = new StatFs(root.getPath());
        // put a bit of margin (in case creating the file grows the system by a few blocks)
        long availableBlocks = (long) stat.getAvailableBlocks() - 4;
        return stat.getBlockSize() * availableBlocks;
    }       
    

    My Samsung Galaxy S reports just 30MB is free in this cache, hence the problem. The phone's overall internal storage however is enormous... I have at least 1.5GB free.

    Clearly there is some download cache limiting policy at work. Very annoying for you.

    Free bytes in /cache for a few phones

    Samsung Galaxy S : 30756KB

    Nexus One: 94352KB

    Orange San Francisco: 38988KB

    0 讨论(0)
  • 2020-12-10 00:38

    On March 5, 2012, Google announced a new policy of allowing up to two "expansion files" of up to 2 Gigabytes each. The APK is still limited to 50MB. Here is the announcement:

    http://android-developers.blogspot.in/2012/03/android-apps-break-50mb-barrier.html

    Since the downloads of such additional files occur separately from the download of your APK, it seems likely that you could solve your problem by moving a chunk of your APK into an expansion file so as to keep the APK size within the smallest download cache limits that you anticipate (e.g., 30MB).

    0 讨论(0)
提交回复
热议问题