I am new to the use of smack library and making one chatting application. I have made upto much extent and at this step i want to ask two questions.
when i
1, The problem is you must register a PacketListener for Presence.Type.subscribe
before you connect to server. All the process of add and accept friend i answered in here
2, You can use UserSearch class to search for a specific user and if user is not found on server then you can assume that user is not registered on server.