Android多进程应用程序

时间:2016-03-16 04:27:18

标签: android

我一直想知道在Android上运行多进程应用程序的一件事。

说,我在清单文件中有一个设置如下..

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.multiprocess">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <service
            android:name=".MainService"
            android:process=":main" />
        <service
            android:name=".SubService"
            android:process=":sub" />
    </application>
</manifest>

有了这个,当我用startService()启动这两个服务时,我会在系统的“正在运行的服务”页面上看到每个进程列表。 (见下图)

我想知道如何在Google Play服务的1个名称下获取这两个进程列表? (见下图)

Android multi-process application

1 个答案:

答案 0 :(得分:0)

他们可能会对所有进程使用android:sharedUserId。但无论如何,你可以通过从Google Play * .apk文件中提取AndroidManifest.xml来解决这个问题并进行分析

相关问题