1

I got this log

2021-01-15 10:07:41.179 1004-1628/system_process I/WifiService: setWifiEnabled package=com.google.android.gms uid=10119 enable=false

It seems google services turn off my wifi after connection made. Please help, sorry for my bad english.

1 Answers1

0

Some variants of hotspots require WiFi to be turned off before they can be started. Are you using STAR or POINT_TO_POINT? If so, that may be the reason.

Nearby Connections will also revert WiFi to its original state upon disconnection if Connections happened to enable it during a connection attempt.

Xlythe
  • 1,958
  • 1
  • 8
  • 12
  • I'm using POINT_TO_POINT strategy. I guess I cannot do any action to keep wifi on during connection. – Nguyen Van Hanh Jan 16 '21 at 02:08
  • We're adding a new API to signal that you don't want WiFi to ever be disabled (at the potential cost of throughput). It hasn't been fully built, though, and will take some time to roll out publicly. – Xlythe Jan 16 '21 at 23:59