dji-sdk / Mobile-SDK-Android-V5

MSDK V5 Sample
Other
282 stars 146 forks source link

onProductDisconnect callback sometimes not received. #128

Closed andrewdittmer closed 1 year ago

andrewdittmer commented 1 year ago

Using the sample app, put logs in all connect / disconnect events such as onProductConnect, onProductDisconnect etc...

Connect drone and run app. After you can see the drone name, disconnect the cable.

Expected result: Always receive a disconnect event callback

Actual result: Sometimes the disconnect event callback is received and sometimes not.

Tested on Google Pixel 4a and Pixel 4.

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #86633:

Under what circumstances will onProductDisconnect be triggered? You can find this information in the following article:How do I get and listen to the connection status of the drone and each component?

I would like to inquire if you did not receive the onProductDisconnect callback even when the remote controller and SDK were disconnected. Could you please confirm this?

°°°

andrewdittmer commented 1 year ago

Thanks for sending the article that tells me how to check in v5. I'll try it out.

I did not receive the onProductDisconnect callback even when the remote controller was disconnected from the phone.

Thanks.

andrewdittmer commented 1 year ago

Also, using the following code, there doesn't appear to be any value update on the disconnect of flight controller. I always receive "true" and never "false". Even after disconnecting the controller from the phone. Is this expected? It's unclear from the documentation whether I should expect to receive false.

FlightControllerKey.KeyConnection.create().listen(this) { Log.d(TAG, "FlightControllerConnected: $it") }

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #86633:

I did not receive the onProductDisconnect callback even when the remote controller was disconnected from the phone. --> We would like to inform you that there is a known issue with MSDK. We are currently working on resolving this issue and it will be fixed in version 5.5.

°°°

andrewdittmer commented 1 year ago

Great. Thanks for the confirmation of the bug and the expected fix version.

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #86633:

I'm glad I could help you.

°°°

dji-lyt commented 1 year ago

Version 5.5 has been release.