APK外部数据,Android的扩展数据、APK、Android

2023-09-06 05:22:39 作者:天涯浪妓

我使用Android的扩展,它可以帮助我们去除的apk 50MB限制障碍的概念。

以下所有步骤 http://developer.android.com/guide/市场/膨胀files.html

我明白你需要遵循这样的文件格式 [主|补丁]<扩充版><包名称> .obb ,做相同。

和还扩展文件可能在(ZIP,PDF格式,MP4等)格式。

我上传的额外的扩展文件,同时发布在谷歌游戏APK。在下载APK的时候,我得到的所有附加在我的本地(高级最新的设备)的,但通过code,我不能让我的应用程序的expansable文件。

android studio导出apk

在code在看sampleDownloader code我才知道,它需要三个参数(int型的,int展开code,长文件大小)

在这里类型:主/补丁 扩展code:整数,但我只是想知道如何在长(精确)给予文件大小?而第二件事像下载其显示消息失败,因为资源无法找到

你知道吗?

更新 完成所有步骤都显示 here

解决方案

你经历的 下载扩展文件 ?它提到

如果扩展的文件是不是有与您从Android Market下载应用程序,  你必须执行 应用程序许可 获得你的应用程序的扩展文件中的 名称尺寸网​​址

     在使用谷歌Play的应用程序授权,让您的应用程序的扩展文件名,大小,和URL执行一个请求。   使用谷歌提供的网址播放下载的扩展文件并保存扩展文件。   

更新:

没有,它不是强制性的,谷歌授权仅适用于支付应用。有一个明确的 注意: 定义该文档本身的任何应用程序可以使用授权服务来启动一个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.

Perform a request using Google Play's Application Licensing to get your app's expansion file names, sizes, and URLs. 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.