Why does sendMediaStreamingVideoEnable () return bad parameter?


#1

Hi,
My Android APP for controlling Jumping Sumo could not receive onFrameReceived (), but always receive onFrameTimeout (). Today I found sendMediaStreamingVideoEnable () will return “bad parameter”, and after some check I luckily found that, if I wait a while before calling sendMediaStreamingVideoEnable () after start device controller, sendMediaStreamingVideoEnable () will success, and I may be able to receive frame. However if APP pauses and resumes the problem will come back again.
Is there a good way to fix this? Thanks for any help. :blush:

                     deviceController.start();

                         //wait a while, or following sendMedia... will return bad parameters
                         try {
                             Thread.sleep(100);
                         } catch (InterruptedException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
                         }

                    ARCONTROLLER_ERROR_ENUM kerr;
                    kerr = deviceController.getFeatureJumpingSumo().sendMediaStreamingVideoEnable((byte)1);
                    if ( kerr != ARCONTROLLER_ERROR_ENUM.ARCONTROLLER_OK )
                       Toast.makeText(getApplicationContext(), kerr.toString (), Toast.LENGTH_SHORT).show();

#2

Same problem here, any hints would be really useful.


#3

You have to do it as it is done in the samples: wait for the state running before sending the command.