Develop your own MSN java client. Written by Ivan Shi
Continued from page 1
trail to // your message mm.setMessage("How are you doing? "); // set message kind to MESSAGE -_-!!! // you have to do this. mm.setKind(mm.KIND_MESSAGE); if (robot.msn.sendMessage(mm,ss)) { // message sent successfully System.out.println("send msg ok!"); }else{ // failed System.out.println("send msg faild!"); } }catch(Exception e){ e.printStackTrace(); } } }
Coding Step 2: Write a public class with static main method as your own msn client.
public class Client {
public static void main(String[] args) { Email = "your@hotmail.com"; Password = "you_msn_account_password"; // create a new MSNMessenger instance msn msn = new MSNMessenger(Email,Password); // set initial status to online. msn.setInitialStatus(UserStatus.ONLINE); // register your pre-created adapter to msn msn.addMsnListener(new MSNAdapter(msn)); // login into msn network msn.login(); System.out.println("Waiting for response...."); } }
Coding Step 3: Debug or run your application.In context menu of project jRCS, select Run --> Java Application, Eclipse will compile code and run application in the Console. If you have your msn account set properly, and you have another msn account that add this msn account as contact, you will see this msn account log in, and then you can send some message to this contact as you wish, how ever Contact will only and always answer you "How are you doing?".*_^

Ivan Shi, Web Server System Developer living and working in Shanghai,China He has a Blog "Technically Blog Ivan"(http://www.ivanshi.com/), blogging his life,feel,mind and technology. He is doing a lot to make his speaking and writing English much more better!
| | The Da Vinci Code Is A Must-Read ThrillerWritten by Rakhi Garg
Continued from page 1
What is this mind threatening puzzle? Want to unfold this nail-biting mystery? Then please download on your palm a great, exhilarating, fascinating and spellbinding story--“THE DA VINCI CODE BY DAN BROWN”. I am sure, once you start to read this, you will find yourself totally helpless to get rid of it till you will not finish it.

Rakhi Garg is a freelance writer for http://www.free-palm-programs.com The #1 source for everything Palm!
|