最終更新:2016-02-08 (月) 14:15:52 (2993d)
android:process
Top / android:process
http://developer.android.com/intl/ja/guide/topics/manifest/service-element.html
説明
- Normally, all components of an application run in the default process created for the application. It has the same name as the application package. The <application> element's process attribute can set a different default for all components. But component can override the default with its own process attribute, allowing you to spread your application across multiple processes.
- If the name assigned to this attribute begins with a colon (':'), a new process, private to the application, is created when it's needed and the service runs in that process. If the process name begins with a lowercase character, the service will run in a global process of that name, provided that it has permission to do so. This allows components in different applications to share a process, reducing resource usage.
- この属性にコロン (':') で始まる名前を割り当てる場合は、新たなプロセスが、アプリケーションでプライベートで、それが必要となったときに作成されます。プロセス名が小文字で始まる場合は、その名前でグローバルなプロセスが作成されます。グローバルプロセスが他のアプリケーションと共有可能となり、利用するリソースを節約につながります。
AndroidManifest.xml/application
- アプリケーションのすべてのコンポーネントが実行されているべきプロセスの名前
- 他のアプリケーションと共有されるプロセス名に対しこの属性を設定することにより、両方のアプリケーションを同じプロセスで実行するようにアレンジすることができます。しかし、それが可能なのは、両方のアプリケーションがユーザ ID を共有し、同じ証明書での署名されている場合のみです。
AndroidManifest.xml/activity
- アクティビティが実行されているべきプロセスの名前
AndroidManifest.xml/service
- サービスが実行されているべきプロセスの名前