简体   繁体   中英

Bluetooth connection to Sphero is lost when smartphone “goes to sleep”

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM