Why is discovering peers for Android Wi-Fi Direct so unreliable?

前端 未结 4 602
礼貌的吻别
礼貌的吻别 2020-12-25 10:24

I am experimenting with Android\'s Wi-Fi Direct (or P2P if you prefer). I thought it was working very nicely between my two phones, but I realized I am encountering issues w

4条回答
  •  不知归路
    2020-12-25 11:02

    I was able to "solve" the problems of some phones not appearing by requesting peer discovery every 10 seconds. I think I was running into this because one phone was always the host and I didn't bother to have it discover peers (because it doesn't try to join them), and the Wifi Direct was going to sleep on the host phone. I don't do anything with the peer results, but it wakes up the Wifi Direct system. There's probably a better method to call but I'm not sure what it is. If I had to guess I'd say I'm wasting some battery life.

提交回复
热议问题