Problem using IKeyManager in JAVA

Completed

Comments

5 comments

  • DJI Developer Support
    If you want to obtain information such as battery percentage, altitude, speed, etc., you can only use KeyManager to monitor the corresponding key to obtain the information you want. There is no way to obtain it without using this
    0
    Comment actions Permalink
  • joao.morais2000

    Thank you, I managed to do it, it was something like this:

    KeyManager.getInstance().listen(KeyTools.createKey(BatteryKey.KeyChargeRemainingInPercent), this, (oldValue, newValue) -> { 
    batteryPercentageLiveData.postValue(newValue);
    });

    KeyManager.getInstance().listen(KeyTools.createKey(BatteryKey.KeyBatteryTemperature), this, (oldValue, newValue) -> {
    batteryTemperatureLiveData.postValue(newValue);
    });

    One more question. Can't I use the DJI Mini 3 Pro on the simulator?? I know that I can simulate values in the sample code, but I really want to fly it in the simulator.

    0
    Comment actions Permalink
  • joao.morais2000

    That one detects the drone, but it doesn't have the simulator tab.

    0
    Comment actions Permalink
  • DJI Developer Support
    It is possible to open the simulator in MSDK, but if you want to use dji-assistant-2 to open the simulator, you can contact **support@dji.com** to give feedback on your needs
    0
    Comment actions Permalink

Please sign in to leave a comment.