扩展文件下载,但不存在 [英] Expansion file downloaded but not there

查看:277
本文介绍了扩展文件下载,但不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我复制为Android的扩展包样品,并使其运行基于提供的指南谷歌的。我已经成功地使它通过存储在本地.obb文件工作,但我不能设法得到它下载.obb文件中工作。状态更改为 IDownloaderClient.STATE_COMPLETED ,但被发现没有文件了。

So I've copied the expansion package sample for Android and made it run based on the guide provided by google. I've successfully made it work by storing a local .obb file but I can't manage to get it to work with downloading the .obb file. The state is changed to IDownloaderClient.STATE_COMPLETED but no file it to be found.

步骤我经历过的:

  1. 请样品运行(更新 BASE64_PUBLIC_KEY 新包的名字版本号
  2. 在成功地与当地.obb文件测试。
  3. 请apk文件并上传到与扩展文件一起玩。
  4. 在安装apk文件签署和运行应用程序。 < - 这里说的下载是成功的,但没有在下载过程中给予的任何最新进展
  1. Make sample run (updated with BASE64_PUBLIC_KEY, new package name, version number)
  2. Successfully test with local .obb file.
  3. Make apk and upload to Play together with expansion file.
  4. Install signed apk and run app. <-- here it says download was a success but without giving any progress updates during the download process.

请帮助得到扩展文件下载。

Please help getting the expansion file downloaded.

编辑:在步骤4我现在得到下载失败,因为resouces找不到

At step 4 I now get Download failed because the resouces could not be found.

编辑2:调试完毕后,我看到状态更改为无需下载,但无法验证文件,因为它是缺失的。因此,出于某种原因,它认为该文件已被下载。

Edit 2: So after debugging I see that status changes to no download required but it fails to validate file as it is missing. So for some reason it thinks the file has been downloaded.

修改3:所以里面DownloaderService.class我们有一个run()方法使一个 getExpansionURLCount()返回0。文件说, :这将返回零,如果一直没有取拉特在当前会话。经过挖掘我看到的反应,我从谷歌的 processServerResponse()的响应code 256和无钥匙 FILE_URL 。那么究竟是什么原因呢?

Edit 3: So inside DownloaderService.class we have a run() method which makes a getExpansionURLCount() which returns 0. Documentation says: this will return zero if there has been no LVL fetch in the current session. After more digging I see that the response I get from Google in processServerResponse() has the response code 256 and no keys with FILE_URL. So what is the cause for this?

推荐答案

我知道这个答案并没有解决根本问题,但我认为这样的解释可能会帮助别人喜欢我是谁一直搞不清楚从下载库的答复

I know this answer doesn't address the underlying problem, but I thought this explanation might help others like me who have been confused by the responses from the downloader library:

的下载服务将(有些非直觉)通 STATE_COMPLETED onDownloadStateChanged()当谷歌授权服务器通知它有与该应用相关联的不扩张的文件。因为它必须作出一个异步调用服务器来发现这一点,它不能只是返回 NO_DOWNLOAD_REQUIRED 直接从 startDownloadServiceIfRequired()。它启动该服务咨询服务器。

The downloader service will (somewhat un-intuitively) pass STATE_COMPLETED to onDownloadStateChanged() when the Google Licensing server informs it that there are no expansion files associated with the app. Since it has to make an async call to the server to find this out, it can't just return NO_DOWNLOAD_REQUIRED directly from startDownloadServiceIfRequired(). It has to start the service to consult the server.

不过,现在看来,这只会做这第一次调用下载服务已安装的应用程序之后 - 在那之后,它会缓存从授权服务器在本地数据库 startDownloadServiceIfRequired()将立即返回 NO_DOWNLOAD_REQUIRED

But it seems it will only do this the first time you call the download service after your app is installed - after that, it caches the response from the licensing server in a local database, and future calls to startDownloadServiceIfRequired() will immediately return NO_DOWNLOAD_REQUIRED.

响应code 256对应于 Policy.LICENSED ,这意味着包名称和公钥是有效的,但缺乏任何 FILE_URL的显示,谷歌播放认为有的是应用程序没有扩展的文件的。

Response code 256 corresponds to Policy.LICENSED, meaning the package name and public key are valid, but the lack of any FILE_URL suggests that Google Play thinks there is no expansion file for the app.

在我的情况,我的扩展文件工作时,该应用程序是草案,但一旦出版,它有效地从商店消失了。我一直无法确定原因。

In my case, my expansion file worked when the app was in draft, but once published, it effectively disappeared from the store. I have not been able to determine why.

这篇关于扩展文件下载,但不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆