how to get mobile online status of the facebook user using smack?
Asked Answered
D

2

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?
Deckle answered 23/5, 2014 at 6:28 Comment(0)
C
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 
}
Corporator answered 9/4, 2015 at 11:49 Comment(1)
Yes we can get status, but I want weather He is from mobile(messanger) or website user.Deckle
G
0

For #2, You may use Mobile EESP library.

Gert answered 15/4, 2015 at 7:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.