dji-sdk / Mobile-UXSDK-Android

DJI Mobile UXSDK is a suite of product agnostic UI objects that fast tracks the development of Android applications using the DJI Mobile SDK.
Other
152 stars 110 forks source link

BatteryWidget is flashing on and off intermittently #143

Open sumanhaque opened 2 years ago

sumanhaque commented 2 years ago

dji.ux.widget.BatteryWidget is flashing on and off intermittently on the screen. Sometimes it becomes invisible for more than 15 seconds. Code snippet

<dji.ux.widget.BatteryWidget
    android:id="@+id/widgetBattery"
    android:layout_width="96dp"
    android:layout_height="22dp"
    custom:excludeView="singleVoltage|doubleVoltage" />

Below are the envrionment details, dji-sdk version 4.16 and dji-uxsdk version 4.16 Drone model number is dji Mavic Pro, dji Mavic 2 pro, dji phantom 4 Android OS 11, 12

DJI-William commented 2 years ago

Could you please upload a video record for us to understand what the issue looks like please. Link:https://pan-sec.djicorp.com/s/neW4bH7tQ8rJXdi dji123

sumanhaque commented 2 years ago

I have uploaded the screenrecord of the issue on your provided url(https://pan-sec.djicorp.com/s/neW4bH7tQ8rJXdi). Please check.

DJI-William commented 2 years ago

A minor error, I think there is something wrong in the refresh method. I will report to the dev team.

sumanhaque commented 2 years ago

Thank you @DJI-William for the update. Will be waiting for a response.

DJI-William commented 1 year ago

@sumanhaque We are now trying to reproduce this issue but failed with this. We are using Honor 8x. Which phone model are you using?

sumanhaque commented 1 year ago

@DJI-William Below are device details, with which I have faced this issue, Mi 11x, Android OS version 11 Samsung Galaxy Tab S7, android os version 12

DJI-William commented 1 year ago

Is it possbile to give us your layout.xml? We cannot reproduce it, we just guess it may influenced by the layout file. The video you provided shows us it is not the original sample we provided. What have you changed tho?

sumanhaque commented 1 year ago

The video is from a POC app and sharing the layout.xml won't be possible.

Though I can confirm, the only code written for battery widget is as below,

<dji.ux.widget.BatteryWidget
    android:id="@+id/widgetBattery"
    android:layout_width="96dp"
    android:layout_height="22dp"
    custom:excludeView="singleVoltage|doubleVoltage" />

and there are no other code written for battery widget.

Hoker- commented 1 year ago

@sumanhaque hello,do you have the sample problem on uxsdk sample?

sumanhaque commented 1 year ago

I havent tried uxsdk sample on this device. If it's required then I will set it up and test. Please let me know if there are any specific test condition you have in mind.

Hoker- commented 1 year ago

just check the https://github.com/dji-sdk/Mobile-UXSDK-Android/blob/master/sample/app/src/main/res/layout/activity_customized_widgets.xml , we can not reproduce it on this layout. thanks

sumanhaque commented 1 year ago

Sure @Hoker- , I will test out and provide you all the details by next week.

Hoker- commented 1 year ago

Sure @Hoker- , I will test out and provide you all the details by next week.

thanks

sumanhaque commented 1 year ago

@Hoker- I have done the testing on my side. I ran the smaple app, and it has no blinking issue. Below is the screenshot, sample_app

Let me know, if I need to provide any more information.

DJI-William commented 1 year ago

Since you cannot reproduce on our UXSDK Sample, maybe its your code issue. We cannot do anything about it if we cannot reproduct the issue on our side.

sumanhaque commented 1 year ago

I can understand your point with not being able to reproduce the issue on your side, it becomes really complex to debug in such case.

Though, the only code I have with respect to BatteryWidget is,

<dji.ux.widget.BatteryWidget
    android:id="@+id/widgetBattery"
    android:layout_width="96dp"
    android:layout_height="22dp"
    custom:excludeView="singleVoltage|doubleVoltage" />

and this widget is sharing the same parent constraint layout with its adjacent widgets which doesnt have this issue. Can you please point me the issue with my code?

DJI-William commented 1 year ago

There is nothing wrong with the layout. We cannot find anything wrong here.