每一进程有:一个VM对象、主线程、 MQ和Looper
//........ <activity android:name=".FirstActivity" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".LoadActivity"> </activity> <service android:name=".LoadService" android:process=":remote" > <intent-filter> <action android:name ="com.misoo.pkm.REMOTE_SERVICE" /> </intent-filter> </service></manifest>依据此配置文件将各类部署于两个进程里执行
// IBinder.java // ....... public interface IBinder { // .......... public boolean transact(int code, Parcel data, Parcel reply, int flags) throws RemoteException; // ........... }
原文地址:http://blog.csdn.net/namehybin/article/details/39317321