how to add roster in xmpp using smack api

In last article we have learn how to login on xmpp server using smack api . Now In this article we will learn how to add friends( roster ) in buddy using smack api.For add roster in xmpp first you should make two account. See It how to resister on xmpp server if you do not know how to register user on xmpp server. after that you can send roster request using below code .