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

本文是小编为大家收集整理的关于Apk外部数据,安卓扩展的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在使用Android扩展的概念,这有助于我们去除APK的50MB限制的障碍.

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

我明白你需要遵循像这样[main|patch].<expansion-version>.<package-name>.obb这样的文件格式,并做了相同的.

也可以扩展文件(zip,pdf,mp4等)格式.

在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扩展文件的下载.但是,在这种情况下,您的请求将仅适用于扩展文件,而不是用于检查用户是否支付的用户.

本文地址:https://www.itbaoku.cn/post/102336.html

问题描述

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.

UPDATE:

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.