 <p>Yes, the simplest way to do this is to use a server that keeps track of the states of the logged in users. Your question is not Android specific, and you could e.g. use a general Java based solution modified to fit your needs. <a href="http://pirate.shu.edu/~wachsmut/Teaching/CSAS2214/Virtual/Lectures/chat-client-server.html" rel="nofollow">Here is a simple example/tutorial.</a></p>