asmack library to make subscrition both on android
<p>I want to set subscribtion for user in roster as "both" . I see questions about this but also I can't find the correct solution.</p>

<p>My code is here but the subscribtion  is " from" !!</p>

<pre><code>Presence presenceSubscribe=new Presence(Presence.Type.subscribed);
presenceSubscribe.setTo(email); 
connection.sendPacket(presenceSubscribe);
</code></pre>

<p>And then I changed code like this :</p>

<pre><code> Presence presenceSubscribe=new Presence(Presence.Type.subscribe);
    presenceSubscribe.setTo("myJID"); 
    connection.sendPacket(presenceSubscribe);


 Presence presenceSubscribed=new Presence(Presence.Type.subscribed);
    presenceSubscribed.setTo("myJID"); 
    connection.sendPacket(presenceSubscribed);
</code></pre>

<p>also set subscrition as "from"</p>

<p>Please help me as I am not able to solve it after lot of search and trying.</p>

<p>Thanks in advance.</p>
