Apk外部数据,安卓扩展[英] Apk external data, Android Expansion




跟随所有步骤 http://developer.android.com/guide/market/expansion-files.html



在Google Play上发布APK时,我上传了额外的扩展文件.在下载时,我在我的本地(高级最新设备)中获得所有额外的额外情况,但通过代码我无法获取我的应用程序的可扩展文件.

在代码中查看Sampledownloder代码我知道它需要三个参数(int type, int expansionCode, long fileSize)

这里type: main/patch expansionCode: integer value,但我只是想知道如何在长期以来给文件(准确)?而第二件事是它的显示消息如下载失败,因为无法找到资源


更新 完成后,所有步骤都显示 这里


您是否通过 下载扩展文件 ?它提到了

如果扩展文件不在Android Market下载您的应用程序, 您必须执行 application许可 您的应用程序的扩展文件 names ,sizes和URLs.

  1. 使用Google Play的申请许可执行请求,以获取您的应用程序的扩展文件名称,大小和URL.
  2. 使用Google Play提供的URL下载扩展文件并保存扩展文件.


否,它不强制谷歌许可仅适用于付费申请.有一个清晰的 注意: 定义Docs本身可以使用许可服务来启动APK扩展文件的下载.但是,在这种情况下,您的请求将仅适用于扩展文件,而不是用于检查用户是否支付的用户.



I am using concept of Android Expansion which helps us to remove obstacle of 50mb limitation of Apk.

Following all the steps http://developer.android.com/guide/market/expansion-files.html

I understood that you need to follow file format like this [main|patch].<expansion-version>.<package-name>.obb and did the same.

And also Expansion files may be in (ZIP, PDF, MP4, etc.) format.

I uploaded additional expansion files while publishing apk on Google play. At the time of download apk I get all the additional in my Local(Advanced latest Device), But through code I am not able to get the expansable files of my application.

In code looking at the sampleDownloader code I came to know that it requires three parameter (int type, int expansionCode, long fileSize)

here type: main/patch expansionCode: integer value but I am just wondering how to give FileSize in Long(exact)? and second thing its show message like Download failed because the resource could not be found

Any idea?

Update Done, all steps are shown here


Did you go through Downloading the Expansion Files? It mentions that

If the expansion files are not there with your Application downloaded from Android Market, You have to perform Application Licensing to get your app's expansion file names, sizes, and URLs.

  1. Perform a request using Google Play's Application Licensing to get your app's expansion file names, sizes, and URLs.
  2. Use the URLs provided by Google Play to download the expansion files and save the expansion files.


No, its not compulsory that Google Licensing only works with paid Application. There is a clear Note: defined in the Docs itself that any application may use licensing service to initiate the download of an APK expansion file. But, in that case your request will be only for expansion files and not for a check whether the user paid for the app or not.