0
votes

I am beginner in xmpp openfire.I am creating an android chat application.

I know how we can send and accept subscription request in openfire.But how can we know if user has received any subscription request from other user in android?

I have searched around the internet for this but didn't find any satisfactory answer.

Do we receive any automatic notification upon request or we have to call any function. Please help me.I will be highly obliged for your precious answer

1

1 Answers

1
votes

First, you need to understand few things in smack. e.g you need to add a packet listner so that you have access to all the packets. without registering your listner you won't get any packet but smack will still get those and even print those in logcat. So register your listner and set the debugger = true in smack configuration so it prints all the packets in logcat and you can understand better.

Secondly, Yes, B will get the packet ("notification") that A has added you ,now base on Roster subscription settings, decision will be taken.

Thirdly, as per my knowledge, you will receive these subscription/presence packets whenever B gets online. so you have that place to take your action.

I would really recommend you to check the official docs here: Smack Docs