1. Chat is a member listener. Add it to muc.
/*** Chat room member listener ** @ author Liao naibo **/class myparticipant statuslistener implements maid {@ overridepublic void admingranted (string arg0) {log. I (TAG, "grant administrator permissions" + arg0) ;}@ overridepublic void adminrevoked (string arg0) {log. I (TAG, "Remove administrator permissions" + arg0) ;}@ overridepublic void banned (string arg0, string arg1, string arg2) {log. I (TAG, "do not join the room (pull black, do not know how to understand, haha)" + arg0);} @ overridepublic void joined (string arg0) {log. I (TAG, "the joined method is executed:" + arg0 + "added to the room"); // update the member getallmember (); android. OS. message MSG = new android. OS. message (); MSG. what = member; handler. sendmessage (MSG) ;}@ overridepublic void kicked (string arg0, string arg1, string arg2) {log. I (TAG, "" + arg0 + "") ;}@ overridepublic void left (string arg0) {string Lefter = arg0.substring (arg0.indexof ("/") + 1); log. I (TAG, "the left method is executed:" + Lefter + "left room"); // update the member getallmember (); android. OS. message MSG = new android. OS. message (); MSG. what = member; handler. sendmessage (MSG) ;}@ overridepublic void membershipgranted (string arg0) {log. I (TAG, "grant Member Permissions" + arg0) ;}@ overridepublic void membershiprevoked (string arg0) {log. I (TAG, "member permission removed" + arg0) ;}@ overridepublic void moderatorgranted (string arg0) {log. I (TAG, "Grant host Permissions" + arg0) ;}@ overridepublic void moderatorrevoked (string arg0) {log. I (TAG, "remove host permission" + arg0) ;}@ overridepublic void nicknamechanged (string arg0, string arg1) {log. I (TAG, "nickname changed" + arg0);} @ overridepublic void ownershipgranted (string arg0) {log. I (TAG, "Grant owner permission" + arg0) ;}@ overridepublic void ownershiprevoked (string arg0) {log. I (TAG, "Remove owner permission" + arg0) ;}@ overridepublic void voicegranted (string arg0) {log. I (TAG, "to" + arg0 + "authorized speech") ;}@ overridepublic void voicerevoked (string arg0) {log. I (TAG, "forbidden" + arg0 + "speak ");}}
2. Status Monitoring
Class myuserstatuslistener implements userstatuslistener {/* implement the default method here */}
"Source code 《《《《《《《《《《《《《
They are all the same. If you cannot understand them, you can translate them. If you are tired, go to bed first.