zoukankan      html  css  js  c++  java
  • 指定安装应用程序移至SD卡(App2SD)

    在2.2发布之后,除了增加Flash Player的支持外,最令人瞩目的莫过于App to Sdcard的支持了。至此之前,android应用程序仅能安装于手机内存,而在“有限”的资源下,至多能安装50-100套程序。    

    1.Intent i = new Intent("android.intent.action.MANAGE_PACKAGE_STORAGE");

      startActivity(i);

    2.

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.spinner"
        android:versionCode="1"
        android:installLocation="preferExternal"
        android:versionName="1.0" >
    
        <uses-sdk
            android:minSdkVersion="8"
            android:targetSdkVersion="17" />
    
        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity
                android:name="com.spinner.MainActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    
    </manifest>

    a.android:installLocation="preferExternal"   //如API小于8,那系统无法识别

    b.android:installLocation="auto"               //只说下这个把,其他2个就不说了。默认安装在内存里,如果发现手机内存偏低,且内存卡也存在,则由系统决定安装的位置。

    c.android:installLocation="internalOnly"

  • 相关阅读:
    1155 Heap Paths (30 分)
    1147 Heaps (30 分)
    1098 Insertion or Heap Sort (25 分)
    12.SpringMVC 获得 请求头信息
    11.SpringMVC 获得Servlet相关API
    10.SpringMVC 自定义类型转换器
    18. VUE 数组的响应式
    017 vue 关于 v-for 指令内部算法
    17. VUE v-show 和 v-if 的区别
    16. VUE 的 小案列
  • 原文地址:https://www.cnblogs.com/royi123/p/3297559.html
Copyright © 2011-2022 走看看