android – Google Play扩展文件位置

android – Google Play扩展文件位置,第1张

概述我们使用Google Play扩展APK机制获得了大约600MB的扩展文件.我们还必须解压缩此文件以供实际使用.因此,整个应用程序和数据需要大约1.4 GB的存储空间. 据我所知,Google Play坚持将.obb下载到“内部”SD,似乎没有任何方法可以改变它.我们有很多用户在他们的“外部”SD卡上有很多可用空间,但内部空间有限.他们尖叫着应用程序占用了这么多空间.我们能做些什么吗? 我们目前将 我们使用Google Play扩展APK机制获得了大约600MB的扩展文件.我们还必须解压缩此文件以供实际使用.因此,整个应用程序和数据需要大约1.4 GB的存储空间.

据我所知,Google Play坚持将.obb下载到“内部”SD,似乎没有任何方法可以改变它.我们有很多用户在他们的“外部”SD卡上有很多可用空间,但内部空间有限.他们尖叫着应用程序占用了这么多空间.我们能做些什么吗?

我们目前将.obb文件扩展为:

getExternalStorageDirectory()/ Android设备/数据

我想我们可以问用户他们想要的地方,他们可以选择真正的外部SD卡.然而,这仍然会在内部SD卡上留下(基本上无用的).obb文件,Google Play说我们无法删除它.

有没有人对如何正确处理这个有任何建议?

解决方法 根据 Expansion File Storage Location documentation,扩展文件存储在

<shared-storage>/AndroID/obb/<package-name>/

其中共享存储是getExternalStorageDirectory()返回的内容,对于有SD卡的用户,应该在SD卡上.

不幸的是,如同一页上所述:

To ensure proper behavior,you must not delete,move,or rename the expansion files.

我会特别注意这一段:

If you must unpack the contents of your expansion files,do not delete the .obb expansion files afterwards and do not save the unpacked data in the same directory. You should save your unpacked files in the directory specifIEd by 07001. However,if possible,it’s best if you use an expansion file format that allows you to read directly from the file instead of requiring you to unpack the data. For example,we’ve provIDed a library project called the 07002 that reads your data directly from the ZIP file.

总结

以上是内存溢出为你收集整理的android – Google Play扩展文件位置全部内容,希望文章能够帮你解决android – Google Play扩展文件位置所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1127375.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存