title: XMPP presence Subscription
body: <p>In my application when I send a request to any friend using this code..</p>
  
  <pre><code>try {               
                  roster.createEntry(idExtension, nickname, null);
                  roster.setSubscriptionMode(Roster.SubscriptionMode.manual);
                  Presence subscribe = new Presence(Presence.Type.subscribe);
                  subscribe.setTo(idExtension);               
                  connection.sendPacket(subscribe);
  
  
                  return true;
              } catch (XMPPException e) {
                  System.err.println("Error in adding friend");
                  return false;
              }
  </code></pre>
  
  <p>then the subscription says "NONE" in both the friends rosters.</p>
  
  <p>But it should be "TO" and "FROM".</p>
  
  <p>But if For the same process I use this code - </p>
  
  <pre><code>try {               
                  roster.createEntry(idExtension, nickname, null);
                  roster.setSubscriptionMode(Roster.SubscriptionMode.manual);
                  Presence subscribed = new Presence(Presence.Type.subscribed);
                  subscribed.setTo(idExtension);              
                  connection.sendPacket(subscribed);
  
  
                  return true;
              } catch (XMPPException e) {
                  System.err.println("Error in adding friend");
                  return false;
              }
  </code></pre>
  
  <p>Then it gives me right result which i should get in the previous case.</p>
  
  <p>Please tell me why I am not getting the same in SUBSCRIBE mode.</p>
  
  <p>Thanks</p>