In my application i need to call a method of a remote service passing my custom object. As explained in http://developer.android.com/guide/developing/tools/aidl.html i have implemented the Parcelable interface and the result code is the following: http://pastebin.com/83e3FqMV The problem is when i call the remote method, i got this exception:
10-20 10:58:27.047: ERROR/AndroidRuntime(5898): FATAL EXCEPTION: main 10-20 10:58:27.047: ERROR/AndroidRuntime(5898): java.lang.NullPointerException 10-20 10:58:27.047: ERROR/AndroidRuntime(5898): at android.os.Parcel.readException(Parcel.java:1253) 10-20 10:58:27.047: ERROR/AndroidRuntime(5898): at android.os.Parcel.readException(Parcel.java:1235) 10-20 10:58:27.047: ERROR/AndroidRuntime(5898): at it.domod.commons.interfaces.DeviceManager$Stub $Proxy.sendCommand(DeviceManager.java:128) ...... I tried replacing my object with the MyParcelable found here http://developer.android.com/reference/android/os/Parcelable.html and i didn't got any exception. I think that i have implemented correctly the Parcelable in my class because if i put it in an Intent to start another Activity it works. Also if i trace with logcat i can see that my object is correctly deserialized in the service's method, but why this exception is thrown? It is thrown inside the Activity thread. If can be useful i can attach also the .aidl file or whatelse. Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

