12

I am developing Facebook chat application using smack.

  1. Here I want to get online user status of both mobile user's & website user's, and how can I differentiate both of them.
  2. If a user send message ,how can I differentiate he is mobile user (or) website user?
user2709752
  • 488
  • 6
  • 26

2 Answers2

2

Why dont you get it from RosterEntry class

Roster roster = xmppConnection.getRoster();
Collection<RosterEntry> entries = roster.getEntries();
Presence presence;

for(RosterEntry entry : entries) {
    presence = roster.getPresence(entry.getUser());

    System.out.println(entry.getUser());
    System.out.println(presence.getType().name());
    System.out.println(presence.getStatus());//This is what you wanted 
}
dharmendra
  • 7,835
  • 5
  • 38
  • 71
0

For #2, You may use Mobile EESP library.

Bhisham Balani
  • 228
  • 1
  • 4