0

Several months ago, my question was solved in the next thread: https://stackoverflow.com/questions/tagged/sphero-api?sort=newest

But now, the SKD Sphero 2.0 has made several changes. By now, when I connect with a Sphero and I need to move to another activity and keeping the synchrony, and I check if the Sphero ID is correct and it is. But the problem is when I try to find a robot with that id:

This code is in the new activity, the previous was connected with sphero with SpheroConnectionView :

@Override

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final String robot_id = getIntent().getStringExtra(ButtonDriveActivity.EXTRA_ROBOT_ID);    
    setContentView(R.layout.mjoystick);
    if (robot_id != null && !robot_id.equals("")) {
        mRobot =(Sphero) RobotProvider.getDefaultProvider().findRobot(robot_id);

...} }

The result of making .findRobot with the ID of my Sphero is null. So please tell me what is wrong.Thanks

Community
  • 1
  • 1
  • See the answer to [this thread](http://stackoverflow.com/questions/18751733/how-to-keep-a-bluetooth-connection-when-sphero-is-synchronized-and-i-use-several/18836065#18836065). – nodnarb May 01 '14 at 06:23
  • @nodnarb that answer was fine for the older api of Sphero. For the newest it's not ok. – Fernando Prieto Moyano May 02 '14 at 13:22

0 Answers0