Yahoo IM SDK implementation - Message reply is coming too late from server JAVA

216 Views Asked by At

I have implemented yahoo IM SDK from this git link https://github.com/aldrinm/messenger-sdk. I have developed application in which user logs in yahoo messenger from my application, User can send messages to his contacts and also receive them. am using notification manager class from the library to receive notifications. I am using polling as shown or given in the library to receive messages or responses from contacts. I am requesting server after every 10 secs for new notifications but i am getting reply after 5 min, 10 mins and sometimes even 20 to 25 minutes. What can be the problem with this?? Is it the problem with server or my code?? Thanks in advance.

 YahooMessengerMessageManager messageManager=YahooMessengerMessageManager.getInstance();

    Contact contact = new Contact();

    contact.setId(targetusername);

    messageManager.sendMessage(contact, message);

    YahooMessengerNotificationManager notify=YahooMessengerNotificationManager.getInstance();

here am logging in first, sending a msg to a username (which is successful) and then calling notification manager which is in the library given in GIT link

I also realized that the class is calling a server to check new messages with http get and polling after each 10 secs, I am getting reply null in netbeans but if i request same server on browser I get response immediately. I get all the responses immediately what can be the problem?? Getting response for same link in netbeans after 10 or 20 minutes and with browser getting it immediately

0

There are 0 best solutions below