android应用仍然需要包含扩展文件下载器吗? [英] Do android apps still need to contain an expansion files downloader?

查看:98
本文介绍了android应用仍然需要包含扩展文件下载器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,当应用程序大于50MB且必须使用它们时,是否需要这些应用程序能够下载扩展文件.

My question is about the need apps to be able to download expansion files when the app is larger than 50MB and has to make use of them.

根据Android开发人员的帮助,应用程序可以依靠扩展文件和较新的设备,在APK之前/之后会自动下载扩展文件,而在较旧的设备"上,开发人员可以使用Google提供的库来管理下载.

According to the Android developer help, applications can rely on expansion files and on newer devices, the expansion files are downloaded automatically before/after the APK, and on "older devices" developers can use a Google-supplied library to manage the download.

但是此信息已经发布了两年以上. 这是一篇引用该文章的文章: http://www.anandtech.com/show/5629/android-market-app-size-raised-to-4gb-from-50mb 如果那些设备在那时旧"了,那么它们现在已经很古老了,可能不在我的Android应用定位的设备范围内.

However this info has been available for more than two years. Here's an article which cires it: http://www.anandtech.com/show/5629/android-market-app-size-raised-to-4gb-from-50mb If those devices where "old" back then, then they are ancient by now and are probably not in the range of devices my Android app targets.

那么这些旧设备中有哪些可能在安装过​​程中无法下载扩展文件?他们之间有什么共同点?这种设备可能使用的API级别是什么?最近有人(今天是2014年5月7日)是否有实际需要在其应用中安装下载器? 请发布有关这些旧设备"用例的尽可能多的信息,这些用例在安装过程中将不会下载扩展文件(对于该用例,仅要求用户重新安装该应用程序将无法使用).

So which are these old devices that may fail to download the expansion files during install? What is common between them? What is the API level such device might be using? Has anyone experienced an actual need to have a downloader in their app lately (today is 7 May 2014)? Please post as much info as you have about these "old devices" use case, which won't download expansion files during install (and for which just asking the user to reinstall the app wouldn't work).

我问的原因是因为我想避免将Java下载库(和下载接口)添加到我的应用程序中,因为它是使用Android NDK开发的本机应用程序,因此会给项目和处理我的主要本地活动的生命周期.

The reason I am asking is because I would like to avoid adding the java download library (and interface for download) to my app because it's a native app, developed with the Android NDK and it will introduce complexity to the project and the handling of the lifetime and lifecycle of my main native activity.

推荐答案

否,您不需要下载程序库.

No, you don't need a downloader library.

您需要做的就是在Google控制台网站上上传APK时上传您的OBB文件(主要的OBB文件或主要的扩展文件).

All you need to do is upload your OBB files (the main OBB file or the main and the expansion files) when you upload your APK in the Google Console website.

因此,当用户下载您的应用时,OBB是APK的一部分,并被下载并安装在设备的OBB文件夹中.

So when the user downloads your app, the OBB is part of the APK and gets downloaded and installed in the OBB folder in the device.

如果您不删除OBB文件,则您的应用程序文件大小会增加.您可能想要按原样使用它,或者可能要从中提取文件,然后再将其删除.但是您可以自己控制文件,并且不需要文件下载器库.

Your app file size increases if you don't delete the OBB file. You may want to use it as is, or you may want to extract files from it, and delete it later. But you control the file yourself, and you don't need a file downloader library.

问题发生在某些设备上(我无法告诉您哪些设备,但是可能有些设备使用的是旧版Android,如5.0),这些设备没有向用户授予下载obb文件的OBB文件夹的权限,复制到,因此您的应用找不到该文件.有一些解决方法,例如重新启动应用程序,到目前为止我还不记得.

The problem happens with some devices (I can't tell you which ones, but there are some maybe with older Android versions like 5.0) that don't give the user permission to that OBB folder where the obb file is downloaded and copied to, so your app doesn't find that file. There are workarounds around that, such as restarting the app, I don't remember as of now.

我决定停止使用obb文件,因为有些用户抱怨应用程序的大小,并在安装后开始使用Dropbox下载我的应用程序所需的文件. Dropbox的使用非常简单,您可以通过url下载文件.从那以后我再也没有抱怨过了.

I decided to stop using the obb files because some users were complaining about the app size, and started using Dropbox instead to download the files my app needs, after it gets installed. Dropbox is very simple to use, and you can download the files via an url. I haven't had any complains about it since.

这篇关于android应用仍然需要包含扩展文件下载器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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