如何将任何文件附加到 APK 进行安装? [英] How to attach any file to APK for installing?

查看:52
本文介绍了如何将任何文件附加到 APK 进行安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将任何文件或数据附加到 APK 进行安装,以及何时安装该 APK、我的附件文件或数据安装在我们的设备上,我该怎么做?

I want attach any file or data to APK for install , and when to install that APK , my attachment file or data install on our device , how can I do it?

谢谢

推荐答案

您可以直接将数据文件添加到您的 APK(例如,通过将您的文件作为资产或原始文件夹的一部分)并解压/移动/解析此文件当您的应用程序首次启动时.

You could directly add a data file to your APK (by making your file part of the assets or raw folder for example) and unpack/move/parse this file when your application starts up for the first time.

另一种方法是使用 APK 扩展文件(仅适用于在 Google Play 上):

An alternative is to use an APK expansion file (only available on Google Play):

Google Play 为您的应用程序托管扩展文件并提供您无需支付任何费用即可将它们传输到设备.扩展文件保存到设备的共享存储位置(SD 卡或 USB 安装划分;也称为外部"存储),您的应用可以在其中访问它们.在大多数设备上,Google Play 会下载扩展文件同时下载 APK,因此您的应用程序具有用户第一次打开时所需的一切.

Google Play hosts the expansion files for your application and serves them to the device at no cost to you. The expansion files are saved to the device's shared storage location (the SD card or USB-mountable partition; also known as the "external" storage) where your app can access them. On most devices, Google Play downloads the expansion file(s) at the same time it downloads the APK, so your application has everything it needs when the user opens it for the first time.

这篇关于如何将任何文件附加到 APK 进行安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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