Hrk
Hrk

Reputation: 2764

How an Android Wear can keep the handheld wifi device activated?

I've developed an application on Android Wear. The wear app is communicating with the handheld device through the MessageApi. I only send command from the watch to the handheld device.

In order to make the full process work, my handheld device has to be connected to the WiFi, but my handheld device (Motorola Moto x 2014 5.0) is losing the Wifi connection when going in sleep mode even with my Wifi settings saying it should never sleep when it's in standby

It's more a Android OS problem than a development, but is there a workaround to make it work ?

Upvotes: 0

Views: 220

Answers (1)

JohanShogun
JohanShogun

Reputation: 2976

Have you considered attempting to use a wifi lock in order to ensure that the wifi radio doesn't go to sleep?

http://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock.html

Upvotes: 1

Related Questions