Android Question DJI error

PABLO2013

Well-Known Member
Licensed User
Longtime User
Greetings, I have reinstalled my programs but I still continue with this error and I do not know how to fix it, thanks.
 

Attachments

  • Captura.PNG
    Captura.PNG
    64.2 KB · Views: 117

Tempomaster

Active Member
Licensed User
Longtime User
I have now got the example working with the information from this forum. However, I cannot get a connection to the DJI Mavic Mini. When you click the "Start Mission" button, an error message appears:

Screenshot_20210122-090254.jpg


The log output looks like this:

B4X:
Logger connected to:  samsung SM-A520F
--------- beginning of main
**************************** BaseApplication2 **************************
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
Registered successfully!
activation state: UNKNOWN
binding state: UNKNOWN

b4xmainpage$ResumableSub_btnStartMission_Clickresume (java line: 373)
java.lang.RuntimeException: Object should first be initialized (DJIHotpointMissionOperator).
    at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
    at anywheresoftware.b4a.objects.HotpointMissionOperatorWrapper.StartMission(HotpointMissionOperatorWrapper.java:81)
    at gd.dronemaster.b4xmainpage$ResumableSub_btnStartMission_Click.resume(b4xmainpage.java:373)
    at gd.dronemaster.b4xmainpage._btnstartmission_click(b4xmainpage.java:346)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:6897)
    at android.widget.TextView.performClick(TextView.java:12727)
    at android.view.View$PerformClick.run(View.java:26104)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6944)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
(RuntimeException) java.lang.RuntimeException: Object should first be initialized (DJIHotpointMissionOperator).
** Activity (main) Pause event (activity is not paused). **
--------- beginning of system
** Service (starter) Destroy (ignored)**

I am a little overwhelmed with the solution to this problem. The DJI Mavic Mini is definitely supported by the SDK. The connection with the DJI Fly app works perfectly.
 
Upvote 0

Tempomaster

Active Member
Licensed User
Longtime User
Thanks. So it is due to the lack of connection between the app and the drone. The reason for this is currently still in the dark. Erel tested with the DJI Mavic Air. I use the DJI Mavic Mini. Maybe it's related to that. The SDK should actually support both.
 
Upvote 0

PABLO2013

Well-Known Member
Licensed User
Longtime User
Greetings, I hope you are well, this is what comes out in three devices: NVIDIA Shield 8 "16GB, huawei p30 pro, and
Samsung Galaxy S21 (S30), with the same failure. I apologize for my ignorance, but I think it is the library, since from the previous one it is the same failure, thanks.

I tell you that I read in a forum that dji and androidx were not compatible, but I only read it.
drone-log.png
 
Last edited:
Upvote 0

PABLO2013

Well-Known Member
Licensed User
Longtime User
2. Have you actually connected to the flight controller? Are you sure that the official app didn't "steal" the USB connection? Worth testing it with a device where no other USB app is installed.
Which device are you using?

I tell you that the phones are not used for testing and the application dji was never installed
 
Upvote 0

PABLO2013

Well-Known Member
Licensed User
Longtime User
Regards. I tell you that today I reinstalled the application, I do not know the reason, but now the application works, thanks for the help.
 
Upvote 0
Top