I am developing a simple android chat application.I am creating three users using asmack one by one and also providing roster entries at creation time using roster.createEntry(); method
first of all i create
1.) user 111 with two roster entries (JID=222@localhost.localdomain,JID=333@localhost.localdomain)
then I create second user
2.)user 222 with two roster entries (JID=111@localhost.localdomain,JID=333@localhost.localdomain)
then I create user 333
3.) 333 with two roster entries (JID=111@localhost.localdomain,JID=222@localhost.localdomain)
here when I see roster entries of all three users then
for user 111
Subscription type for
JID=222@localhost.localdomain : "from"
JID=333@localhost.localdomain : "from"
for user 222
Subscription type for
JID=111@localhost.localdomain : "to"
JID=333@localhost.localdomain : "from"
for user 333
Subscription type for
JID=111@localhost.localdomain : "to"
JID=222@localhost.localdomain : "to"
So my problem is although all three users are online But the Presence is as follow
a.) 111 is "available" for 222 and 333
b.) 222 is "available" for only 333
c.) 333 is not available for any user
clearly this is due to "from" status .But I want that as all are online and all are added into each others roster list, so I need subscription status "both" for all three users roster list.So they will be "available" for each other if they are online.
Please help me how can I achieve this.