Can someone explain me how android performs Group Owner Negotiation? In particular how does android perform GO request/reply exchange? Thanks!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You should set the Intention before connecting to the other WiFi p2p enabled devices. You do not need to do anything else regarding the GO negotiation. It means that you perform the discovery and then, you request to connect to one of the peers that is discovered. Then it would be the android API responsibility to perform the negotiation phase.
回答2:
You can decide who becomes group owner by this line of code :
config.groupOwnerIntent = x;
Where x is from 0 to 15. 0 representing least intention to become owner while 15 represents the highest.
Reference