1) Is it possible to start an IntentService on a separate process? How? If so, is it mandatory to bind to it?
是的,您可以在单独的进程中启动IntentService。只需将android:process =“:whatever”添加到该服务的清单条目。
不,你不需要绑定它。您可以通过使用startService()发送Intent来进行通信
2) Is it possible to start an IntentService on a separate process AND run it in the foreground?
是(见上文)。要使您的服务在前台运行,它可以在需要时调用startForeground()。服务本身可以控制是否在前台或后台运行。
3) What’s the difference between android:isolatedProcess and android:process? See: 07000
android:进程允许您控制每个特定组件在哪个进程中运行(通过指定进程的名称)。您可以将应用程序的组件分组在单独的进程中运行(例如,一个进程中的所有UI组件以及另一个进程中的所有服务)。默认行为是应用程序的所有组件在同一进程中运行。
android:isolationProcess是一个标志(true / false),您可以设置一个特定的服务组件在与其他应用程序隔离的单独进程中运行。隔离的进程没有授予您的其余应用程序的任何权限。通常,权限被授予应用程序,应用程序的所有组件都具有应用程序获得的所有权限。 android:isolationProcess只能从API级别16(Jellybean)开始。见http://aleksmaus.blogspot.de/2012/09/a-feature-of-android-jelly-bean.html和Advantage of introducing Isolatedprocess tag within Services in JellyBean[Android]