【问题标题】:How to make my app to download in only in sdcard android?如何让我的应用程序仅在 sdcard android 中下载?
【发布时间】:2014-07-15 07:16:24
【问题描述】:

我是 android 新手,打算在 google play 中启动一个 android 应用程序。因为我的应用程序很大,所以我希望我的应用程序在用户下载时下载到 sdcard 中。

我必须为此做些什么?我必须在清单文件中给予任何许可吗?

谁能建议我如何解决这个问题?

【问题讨论】:

  • 您可以使用 Mike M 发布的上述 url 中给出的选项来定义,您希望将应用程序安装在哪里(在内部或外部存储上),但您的应用程序的下载完全由 google play 应用程序定义它很可能在内部存储区域中。
  • 这很好。我以为它们是指安装位置。
  • @RajenRaiyarela 是的,但这就是他的控制范围,如果 Android 决定下载到内部存储而不是外部存储,即使没有足够的空间,他也无能为力。如果有足够的空间,在安装之前只是暂时的(最好的情况下)。

标签: android google-play android-manifest android-sdcard


【解决方案1】:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:installLocation="preferExternal"
    ... >

来源:http://developer.android.com/guide/topics/data/install-location.html

请记住,并非所有设备都有 SD 卡插槽。

【讨论】:

  • 感谢您的帖子。如果我没有提到它,它将在哪里下载
  • "如果您不声明此属性,您的应用程序将安装在内部存储上"。只需阅读文档,我将链接作为来源发布。这很清楚,应该回答您对此的任何未决问题。
【解决方案2】:
android:installLocation="preferExternal"  put this in your manifest , or more information just go through with this link :

http://developer.android.com/guide/topics/data/install-location.html

【讨论】:

  • 链接不可点击
猜你喜欢
  • 2012-03-19
  • 1970-01-01
  • 2010-11-06
  • 2014-12-22
  • 2020-09-03
  • 1970-01-01
  • 2021-11-05
  • 2011-08-10
  • 1970-01-01
相关资源
最近更新 更多