dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
978 stars 580 forks source link

Total fight distance & fight time #1292

Closed huongta157 closed 5 months ago

huongta157 commented 5 months ago

Have a function to support getting total fight distance and flight time?

dji-dev commented 5 months ago

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

Some models can get time and distance. You can refer to this article;https://sdk-forum.dji.net/hc/en-us/articles/7753552666649-How-to-get-the-flight-distance-flight-times-and-total-flight-time

The data obtained from this interface may differ from the data displayed on the official app.

°°°

huongta157 commented 5 months ago

@dji-dev thank you so much

dji-dev commented 5 months ago

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

I am glad to help you.

°°°

huongta157 commented 5 months ago

@dji-dev I have a question Have a function to support getting activated days?

huongta157 commented 5 months ago
 val flightDistanceKey: DJIKey =
                FlightControllerKey.createFlightAssistantKey(FlightControllerKey.AIRCRAFT_TOTAL_FLIGHT_DISTANCE)
            val value = KeyManager.getInstance().getValue(flightDistanceKey)

Sorry @dji-dev I used this code but the value returned to null. Can you help me?

dji-dev commented 5 months ago

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

We currently do not have an interface to retrieve the activation days. You need to replace "createFlightAssistantKey" with "create" to create FlightControllerKey.AIRCRAFT_TOTAL_FLIGHT_DISTANCE.

°°°

huongta157 commented 5 months ago

@dji-dev thanks I try to call it on Main and IO thread but the result is still null.

dji-dev commented 5 months ago

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

Could you confirm if the model you are using supports obtaining AIRCRAFT_TOTAL_FLIGHT_DISTANCE? We mentioned in our previous communication that this key only works on the M300 and Mavic 2 Enterprise Advanced.

Thank you.

°°°

huongta157 commented 5 months ago

@dji-dev I got it, thank you so much.

dji-dev commented 5 months ago

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

I am glad that I could help you.

°°°