Yes -- have the server confirm each message (or a batch of messages) to the client.

The client would only removes from its queue those messages that have been confirmed.

Now you won't have dropped messages, but you may have some messages being sent twice - if the network disconnects at the wrong time and the client doesn't receive the confirmation for a message that was accepted by the server.

To avoid this last issue, assign each message a unique id and have the server ignore, but confirm, duplicates.

Not much to do with Android, of course - and I suspect Googling should give you a bunch of better ideas than the above :)

-- K

29.03.2012 11:15, <Hera> написал:
¿Is there any way to detect if the message has arrive to the server?
¿Other way to test connectivity or test the server?

--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to