MSDK5 FPVWiget issue
CompletedHello,
Curently I am working on an Android app project using DJI MSDK 5.2 with a M300. When I am finishing the DefaultLayoutActivity and restarting it with a back button, the FPV Widget works well but impossible on the first launch, to apply to the primary fpv widget the stream source (bloqued to UNKNOWN). Same thing append when I am killing and relaunching the app. Can anyone tell me any solution for this?
Here is below my Logcat :
Thanks by advance
-
Maybe it is a sample bug. Please tell me which camera you are using for M300RTK? Could you record a screen record for me to reproduce the issue, then we will check internally. Please upload the recording to this link, https://pan-sec.djicorp.com/s/San2qRRSbZ7GX2S -
I feel like something wrong with your modification. Because it comes up when you first start the app, so it is nothing wrong with the hardware. The difference is the activity life period, first in is onCreate, the second time you go in, the resumer function will be called. Something difference in here. -
This could be due to the fact that the FPVWidget class has been a bit modified, in effect I have encountered problems when I followed the tutorial Chapter 3: Integrate the SDK into your project.
Everything works fine until the last step, I had some kotlin syntax errors at the moment of the run with the DefaultLayoutActivity class.
One of them was because the FPVWidget class have to override 4 methods like surfaceCreated(holder :SurfaceHolder) but the methods in the widget was surfaceCreated(holder :SurfaceHolder?) so I removed the ? in the fourth methods to solve the error.
Do you think it could come from here? -
There is an issue in sample when you hasn't install any camera on it. The FPV may be also black. It is fixed in this branch, https://github.com/dji-sdk/Mobile-SDK-Android-V5/tree/dev-sdk-alpha -
I implemented MSDKv5.3.0 a2 and used the uxsdk from the link and I still have the issue. Plus, I noticed an issue (in MSDKv5.2.0 too), there are differences when I run the app for the first time and when I rerun it a second time after kill : there seems to be a problem with the connexion state of the aircraft.
-
Plus I noticed than even if aircraft is disconnected, I get a productConnectionProcessor.getValue() in the WidgetModel equals to true, how is this possible?
DJIKey<Boolean> productConnectionKey = KeyTools.createKey(ProductKey.KeyConnection);
bindDataProcessor(productConnectionKey, productConnectionProcessor, newValue -> onProductConnectionChanged((boolean) newValue));
Log.e("TAG__debug__product_base", productConnectionProcessor.getValue().toString());
Please sign in to leave a comment.
Comments
25 comments