Problem using IKeyManager in JAVA

已完成

评论

5 条评论

  • 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
    评论操作 固定链接
  • 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
    评论操作 固定链接
  • joao.morais2000

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

    0
    评论操作 固定链接
  • 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
    评论操作 固定链接

请先登录再写评论。