简体   繁体   English

我应该在哪里放置数百张下载的图像?

[英]Where should I put hundreds of downloaded images?

I want to include in my app hundreds of images. 我想在我的应用程序中包含数百张图像。 I understood that downloading an app that weighs hundreds of MB may deter some people, so I need to offer them a chance to download the images themselves. 我知道下载一个重达数百MB的应用程序可能会吓阻某些人,因此我需要为他们提供一个机会来下载图像。 Also - the images would come only if you pay me, so there is no need for a big app. 另外-只有您付钱给我,图片才会出现,因此不需要大型应用程序。
Two questions: 两个问题:


1. I know you can have in google an expansion APK. 1.我知道您可以在Google中拥有一个扩展APK。 How do I upload it? 如何上传? I can't see any option of it in the developers console. 我在开发人员控制台中看不到任何选项。
2. Where should I put them? 2.我应该放在哪里? In what directory or how will I mange to show them? 我将在哪个目录中或如何显示它们? What will be the path ie new File([what?]) (If they will not be shown to the user its best, so please no downloading just to the SDCard). 路径是什么,即新File([what?])(如果不会向用户显示其最佳状态,那么请不要仅下载到SDCard)。
BTW: Getting images from assets is really slow. 顺便说一句:从资产获取图像确实很慢。 I need them fast. 我需要他们。

When you upload you APK on the developer console, there will be an option to also upload an APK expansion file. 在开发者控制台上上传APK时,将有一个选项也可以上传APK扩展文件。

The thing with the APK expansion files is that when the app is downloaded on the Play Store, if the device can download the expansion file, it's downloaded at the same time, otherwise it will download the APK only. APK扩展文件的作用是,将应用程序下载到Play商店后,如果设备可以下载扩展文件,则该文件会同时下载,否则只会下载APK。

Google's advice is that you need to be able to download the expansion file(s) at runtime to deal with memory limitations on some devices. Google的建议是,您需要能够在运行时下载扩展文件,以应对某些设备上的内存限制。 Google offers a library and well documented samples to help you with that. Google提供了一个库和文档齐全的样本来帮助您。

To test that your APK expansion file(s) works well, you can publish your app to Beta testing on the Android developer console. 要测试您的APK扩展文件是否运作良好,您可以在Android开发者控制台上将您的应用发布到Beta测试。

You should read carefully the APK expansion file documentation by Google. 您应该仔细阅读Google的APK扩展文件文档。 I tried it myself and I can tell it's very well explained. 我自己尝试过,可以很好地解释它。 All you need to know is there. 您只需要知道就可以了。

Here's the link to the doc : http://developer.android.com/google/play/expansion-files.html 这是文档的链接: http : //developer.android.com/google/play/expansion-files.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM