在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 安装以后在桌面会出现两个应用图标

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2021-07-18
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
猜你喜欢
  • 2021-04-19
  • 2022-03-01
  • 2022-12-23
  • 2021-11-04
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案