简体   繁体   English

如何使用Android应用程序打包大量照片?

[英]How to package a large number photos with an Android app?

By "a large number" I mean 548 at an average 300k. “大量”是指548,平均30万。 I would really like to avoid making users install the app and then download the image data on first run. 我真的想避免让用户安装应用程序,然后在首次运行时下载图像数据。 The app won't be adding or removing photos, they are just part of the app's content data, displayed in list views and galleries and the like. 该应用程序不会添加或删除照片,它们只是应用程序内容数据的一部分,显示在列表视图和图库等中。

So far I've discovered that putting them all in res/drawable not only makes for a large .apk but also prevents the app from installing on either the emulator or my phone. 到目前为止,我发现将它们全部放置在res / drawable中不仅会产生很大的.apk,而且还会阻止该应用程序安装在模拟器或手机上。

The target API is 8 (Fro-yo). 目标API是8(Fro-yo)。

Now you can use more then 50 Mb for your apk file. 现在,您可以为APK文件使用超过50 Mb的内存。 Here you can read that this feature was recently introduced and this is the tutorial how to use this. 在这里您可以阅读到此功能是最近引入的, 是本教程的用法。

Google just added an option that may be helpful. Google刚刚添加了一个可能有用的选项。 Read this . 阅读 For newer devices it'll download expansion files when you install. 对于较新的设备,安装时会下载扩展文件。 For older devices it'll be a download on first run. 对于较旧的设备,将在首次运行时进行下载。 It's probably your best compromise. 这可能是您最大的妥协。

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

相关问题 Android:从网址中保存大量照片 - Android: save a large number of photos from url 如何在Android中有效打包大量不同分辨率的可绘制图像? - How to efficiently package large number of drawable images for different resolutions in Android? Android应用如何获取特定用户的照片 - Android app how to get photos of a specific user 如何在Android中将照片添加到Foursquare应用程序的签入中 - how to add photos into checkin for foursquare app in android 如何为大量图像创建服务器并在android app中访问它们 - how to create a server for large number of images and access them in android app 如何存储大量单词(由Android应用程序访问)? - How to store a large number of words (to be accessed by an android app)? 在Android应用上标记照片 - Tag photos on Android app 由于大量图片,Android应用程序崩溃 - Android app crashes due to large number of images 将包含大量照片的Android SQLite数据库导出到用户友好输出的策略 - Strategy for exporting Android SQLite Database with large number of photos to user-friendly output 如何仅从Google相册应用中选择图片? Android Google相簿意图 - How to Pick Image From Google Photos App Only? Android Google Photos Intent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM