当前位置 : 主页 > 手机开发 > android >

有没有办法让我的Android应用程序更小?

来源:互联网 收集:自由互联 发布时间:2021-06-11
我正在为 Android创建一个新的应用程序.这是我的第一个申请.它适用于乐器歌曲,但我放在那里的每首歌都是3mb.我的应用程序是一组6首乐器. 有没有办法让我的应用更小? 使用Play商店扩
我正在为 Android创建一个新的应用程序.这是我的第一个申请.它适用于乐器歌曲,但我放在那里的每首歌都是3mb.我的应用程序是一组6首乐器.

有没有办法让我的应用更小?

使用Play商店扩展文件.

Google Play免费托管和提供扩展文件

这些文件可以是您想要的任何文件类型,并保存到设备的共享存储中

User selects to install your app from Google Play.

If Google Play is able to download the expansion files (which is the case for most
devices), it downloads them along with the APK. If Google Play is
unable to download the expansion files, it downloads the APK only.

When the user launches your application, your app must check whether
the expansion files are already saved on the device.

If yes, your app
is ready to go. If no, your app must download the expansion files over
HTTP from Google Play. Your app must send a request to the Google Play
client using the Google Play’s Application Licensing service, which
responds with the name, file size, and URL for each expansion file.

With this information, you then download the files and save them to
the proper storage location.

http://developer.android.com/google/play/expansion-files.html

Each time you upload an APK using the Google Play Developer Console, you have the option to add one or two expansion files to the APK. Each file can be up to 2GB and it can be any format you choose, but we recommend you use a compressed file to conserve bandwidth during the download. Conceptually, each expansion file plays a different role.

网友评论