Bluetooth connection to Sphero is lost when smartphone "goes to sleep"

479 views Asked by At

I am not entirely sure if this is a more generic question than just related to the Sphero API.

I have an old blackberry with a sideloaded APK that connects with a Sphero 2.0. But the same applies to a newer Android phone (that I use for development)

This smartphone is always in the area of the Sphero but also connected to the internet.

The smartphone receives signals from the internet which it translates to the Sphero API.

In this case the Smartphone is not held by a person but in a Sphero Chariot for example.

After a few minutes (max 5 or 10) the smartphone goes to sleep AND looses it's bluetooth connection.

I am looking for a way to keep this connection, battery life is less of a concern.

Thanks

1

There are 1 answers

1
Niklas Heidloff On BEST ANSWER

I had the same problem. I changed the setting to 10 mins as you mentioned.

What happens if you delete "RobotProvider.getDefaultProvider().disconnectControlledRobots();" from "protected void onPause()" as this is done in the samples?