Guilherme RolimReally thanks!Hello Johannes,I made some modifications on the code, trying to display the bundle payload content on the main activity, but it didn't work as I expected. The idea is to send a bundle from the first mobile to a second, and the second gets this bundle, open it's payload and display it. I thought I needed only to call a method inside the public void payload(byte[] data) method, sending it's content to the interface. But the fact is, it was displaying the echoed bundle. For example, the first mobile sent a bundle to a second with echo, the second sent it back, and then on the first mobile, it entered the payload method and displayed. When I removed the /echo, this stopped working and the second mobile continued without displaying it. What exactly do I need to change, to make the second mobile receive a bundle and extract the payload information?
On Sat, Jul 13, 2013 at 6:26 AM, Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> wrote:
Hello Guilherme,
if I remember right, you'll just need to call the toString() method of
the endpoint object to get the Endpoint ID as String.
> neighbours.get(0).endpoint.toString()
Kind regards,
Johannes Morgenroth
Am 12.07.2013 20:18, schrieb Guilherme Rolim:
> Hello Johannes,
>
> I did as you said, however, I didn't find a method to get the endpoint
> name. For example, i have a list of neighbours called "neighbours"
> (List<Node> neighbours = mClient.getDTNService().getNeighbors();), I
> was hoping there would be something like
> "neighbours.get(0).endpoint.getAddress()" returning a String. What is
> the proper way of getting this String that contains the address?
>
> Thanks for the help,
> Guilherme Rolim