zoukankan      html  css  js  c++  java
  • 【Android】Android apk默认安装位置设置

    在Android工程中,设置apk的默认安装位置

    在AndroidManifest.xml文件Manifest标签中添加android:installLocation属性

    android:installLocation

    这个属性设置的是默认安装位置, 共有三个有效值,auto、internalOnly、preferExternal

    对应表

    auto 表示自动,由系统决定安装位置

    internalOnly 安装在手机内存

    preferExternal 安装在外部存储中

    Constant Value Description
    auto 0 Let the system decide install location
    internalOnly 1 Explicitly request to be installed on internal phone storage only
    preferExternal 2 Perfer to be installed on SD card, There is no guarantee that the system will honor this request. The application might end up being installed on internal storage if external media is unavailable or too full

     

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.ray"
          android:installLocation="auto"
          android:versionCode="1"
          android:versionName="1.0">

    需要注意的问题(如果遇到其他问题,后期进行补充)

    需要开启启动的程序,一定要安装到手机内存中,这里就关系到广播消息的先后顺序

    开机启动的广播消息BOOT_COMPLETE早于 SD的启动,如果将程序安装到SD卡,无法接收到开机广播。

                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

    本文出自 Ray-Ray的博客

    文章地址 http://www.cnblogs.com/rayray/p/3185811.html 

    感谢大家的推荐和收藏

    你的支持! 我们的动力!

  • 相关阅读:
    武道之路-炼体期五重天中期
    武道之路-炼体期五重天
    武道之路-炼体期四重天巅峰
    修改Oracle监听端口
    完美解决IE(IE6/IE7/IE8)不兼容HTML5标签的方法
    Create Linked Server SQL Server 2008
    Oracle:ODP.NET Managed 小试牛刀
    jquery ajax跨域请求webservice webconfig配置
    oracle 11g ORA-12541: TNS: 无监听程序 (DBD ERROR: OCIServerAttach)
    oracle 11g 一直提示 严重: 监听程序未启动或数据库服务未注册到该监听程序
  • 原文地址:https://www.cnblogs.com/rayray/p/3185811.html
Copyright © 2011-2022 走看看