On Fri, Oct 12, 2012 at 9:14 AM, Zach <[email protected]> wrote:

> Hi,
> Thanks for your reply.
> I was initially using removeGroup. But here is what happened
> A client calls remove group and he will be disconnected from the owner.
> But later when Group owner tries to remove the group, it goes to the
> OnFailure call back. So the only reason would be there is no group
> available to remove. I have to make this guess as I have only 2 devices
> with me.  What do you think about this situation?
>
>
There can be a delay of a few seconds b/w the time the client removes and
by the time the group owner realizes the client is gone and removes it

My guess is you are removing it just as the group has been removed
underneath on the GO - and so it returns a failure.  But that should be ok.
The group will go away without you doing anything on the GO side.

adb logcat should show you what is going on the group owner side.

Anyways I will give a test with more devices soon and I can make sure that
> removeGroup is only removing the group from clients perspective.
>
> Have you tested this before?
> Thanks
>
> On Friday, October 12, 2012 5:07:44 PM UTC+1, Irfan Sheriff wrote:
>>
>>
>>
>> On Fri, Oct 12, 2012 at 3:19 AM, Zachariah Tom <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> I want to disconnect from a wifi direct group after establishing a
>>> connection. I just want to move out silently without interrupting other
>>> clients that are already in connection with the Group owner.
>>>
>>> I use *manager.Connect()* method to establish a connection. But didnt
>>> see any methods to disconnect. Only other option i saw is *
>>> manager.removeGroup()*, but I guess this will remove the entire group
>>> and interrupt the existing network connection.
>>>
>> removeGroup() is what you need. It removes the group from your
>> perspective - it is up to the group owner to decide whether to remove the
>> group after the client has left or not. In case of android, a GO will keep
>> the group until all clients have gone.
>>
>>
>>> Inside the device settings. once connected I can disconnect by clicking
>>> it again. I want to achieve the same via code.
>>>
>>>
>>> I am using Samsung Nexus with JellyBean 4.1.1
>>>
>>> How can I do this properly?
>>>
>>> Thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>>
>>> To unsubscribe from this group, send email to
>>> android-developers+**[email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to