Servant on Android device
Hello. I'm new to programming for Android devices. I'm using Ice for Android (the latest version, 0.1.1).
I've been able to write a client application for an external servant, but I'm having trouble with hosting a servant on the Android device.
First, I briefly explain my application architecture:
- I have an Android activity that launches a Android service.
- The Android service, created by the activity, holds the communicator and the object adapter. I only initialize them on a user interface button callback.
My GUI has two buttons: one of them invokes the service to create the communicator and the object adapter. The other button creates the servant and adds it to the object adapter via my running service.
It works very good, apparently. When I try to remotely invoke the "checked cast" on the proxy hosted on my Android device, the Android's "logcat" gives me this message:
Code:
WARN/System.err(384): 600 error: Ice Acceptor Thread: 0.0.0.0:58458: acceptAsync:
WARN/System.err(384): 0.0.0.0:58458
WARN/System.err(384): java.lang.NullPointerException
WARN/System.err(384): at IceInternal.Network.addressesToString(Network.java:1139)
...
I have marked as synchronized the method that creates the communicator and the object adapter and the method that instanciates the servant and adds it to the adapter.
My servant's remote methods are "synchronized" too.
I was looking for a minimal example of servant hosted on a Android device, but I can't find anyone.
What are my mistakes? Thanks for your attention.
José Luis Segura - ARCO Research Group