Hi there,
a few months ago, I asked this list if someone uses MINA for
communication between Android (DalvikVM) + Java (Oracle JVM), especially
with regard to built-in object serialization
This was the answer (forget to copy also the author's name ...):
----
Yes, MINA works on Android!
I have been using it to develop a publish/subscribe system that supports
Android clients. I think you won't be able to use built-in
serialization, though. Dalvik is not a standard JVM...
Other than that, I've had no issues.
My deployments include Android 2.3 and Android 4.1 using Nexus S
smartphones and the latest version of MINA. In fact, I think they are a
great combination...
----
Today I tested my application (which is a kind of RMI replacement, see
http://dev.root1.de/projects/simon and makes heavy use of serialization
via IoBuffers#getObject/putObject) with Android 4.2.2 (via Android SDK
Emulator). Result: Serialization works... At least with simple classes like:
----
package de.root1.shared;
import java.io.Serializable;
public class MyClass implements Serializable {
private long i = 0;
public MyClass(long i) {
this.i = i;
}
public long getI() {
return i;
}
@Override
public String toString() {
return "MyClass{" + "i=" + i + "}@"+hashCode();
}
}
----
For now, I did not test complex classes. But I assume that this will
also work.
So: Great. Serialization works. But why? I read that it is not working?
I found a lot of resources on the net talking about other ways of
serialization and ways around this issue...
Is there someone on this list who can confirm that serialization between
DalvikVM and JVM with help of MINAs IoBuffer#putObject/getObject is not
an issue at all?
My gurrent guess is, that serialization between both platforms became
compatible with Android Version XYZ ... Would be good to know which
version this was...
Any comments/ideas?
br,
Alex