android:process用于在新进程中启动Activity


在AndroidMenifest.xml文件中使用android:process可以在新进程中启动Activity

        <activity android:name="cn.sinonet.uhome.ui.Loading"
            android:label="@string/app_name" android:process=":process.main"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.haier.uhome.videointercom.ui.HaierCommonAct"
            android:icon="@drawable/uhome" android:label="可视对讲"
            android:launchMode="singleInstance" android:process=":process.sub">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

在两个Activity的IntentFilter都设定为action.MAIN和category.LAUNCHER 安装以后在桌面会出现两个应用图标


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM