Transferred from: http://blog.sina.com.cn/s/blog_4e1e357d0102wau9.html
1.bus Engineering Implementation AIDL entity classes through service
2.actor works by initiating Bindservice, according to the action to start the remote (cross-process) bus on the aidl. So the problem is, we know that the Linux system interprocess communication, the inter-process resources are isolated, two processes need to communicate, it is necessary to convert the MSG to the underlying OS system can recognize the data unit, in the Android program is Aidl+parcelbal serialization. in order to simulate and test the performance of Aidl, I did a simple experiment, in Android, interprocess communication through binder implementation, BIND is the data carrier of communication, when the serialized data unit is too large, there will be problems, Report the Android.os.TransactionTooLargeException. The http://developer.android.com/reference/android/os/TransactionTooLargeException.html official documentation shows that The maximum is usually limited to 1M. That is, if the data is larger than 1M, it should be transmitted separately. Theoretically, it should be the object and string type of data-based, as long as it is not a large picture entity and so on, should generally suffice. I've done a test that serializes the serialized data of a 450k string, which takes 33 seconds. try {StringBuilder sb = new StringBuilder (); for (int i = 0;i< 30;i++) {sb.append (new String (stringmsg));} System.out.println ("Actor time Start:" + System.currenttimemillis ()); Binder.sendmsg ("Msg from actor:" + sb.tostring ()) ;} catch (RemoteException e) {//TODO auto-generated catch Blocke.printstacktrace ();} ------ public static Buscore Corebinder = new Buscore.stub () { @Overridepublic void sendmsg (String msg) throws R emoteexception {log.d ("","Remotebuscoreservice msg:" + msg); system.out.println ("Buscore Time End:" + System.currenttimemillis ());}}; for remote services, you must call the Bindservice () method instead of the StartService () method. was just checking out the next, Mark, when it was doing a framework implementation test today.
Where Android Aidl interprocess communication (android.os.TransactionTooLargeException)