Git Product home page Git Product logo

mobile-uxsdk-android's People

Contributors

alainpimentel avatar dji-dev avatar dji-william avatar hoker1 avatar michael-dji avatar oliverou avatar snmillar avatar talobin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile-uxsdk-android's Issues

Configuration Menu

Hi,
Not an issue but it would be very helpful if the UI library will include the menu for aircraft configuration, a panel menu like the one that appears in the DJI GO application, where you can access to configuration options for the flight controller, vision, and so on.

dji.ui.panel.CameraSettingExposurePanel - aperture not working correctly

Using the panel - CameraSettingExposurePanel - the aperture setting is not scrolling when using the Aperture and manual mode. A small arrow shows up under the aperture but then quickly goes away.

The ISO and shutter scrolls work correctly.

I do not know if this is related, but when the AE button is clicked (dji.ui.widget.AutoExposureLockWidget) - the setting does not save itself. First the setting turns to locked, and but then becomes unlocked if the exposure panel switches to another setting such as manual.

DJI android UI library 4.1.1
Android 7.0 - nVidia k1 shield.
Phantom 4 pro
Android version 2.3.3

Problem with UILibrary Android - Video Freeze

Hello everyone,

I have problems when trying to run the sample application that provides the new version of UILibrary.

The problem is that I can not see the video in real time, sometimes the screen goes black and other times the video is displayed until the top status bar is updated.

I do not know what the problem is.

How can i fix it?

My aircraft is a M600 Pro with the latest firmware. Zenmuse X5 with the latest firmware and the lightbridge firmware is updated as well.

I'm using the latest Mobile-UILibrary-Android-4.2.1.

I am trying to deploy on a huawei mediapad m3 tablet with android version 6.0.

The version of Android studio is 2.3.3.

Any ideas?

Thank you very much.

Blank FPVWidget

I have a problem of blank FPV when running my app on CrystalSky + Matrice 210. The problem disappears if I clear my app data.

Any kind of help would be appreciated.

using

  • 'com.dji:dji-uxsdk:4.5'
  • 'com.dji:dji-sdk-provided:4.5'
        
        super.onCreate(savedInstanceState)
        
        setContentView(R.layout.activity_default_layout)
        
        FPVWidget.videoSource = dji.ux.widget.FPVWidget.VideoSource.PRIMARY
       
        handler = Handler()

        spinnerUI()
        spinnerSectionsUI()

        val gimbals = DemoApplication.getAircraftInstance().gimbals

        for (gimbal in gimbals) {
            if (gimbal.index == 0 && gimbal.isConnected) {
                connectedGimbal = gimbal
            }
        }

        connectedGimbal?.let {
            it.setStateCallback {
                handler!!.post {
                    textPercentAlt.text = "pitch\n${it.attitudeInDegrees.pitch}"
                }
            }
        }

        DemoApplication.getCameraInstance()?.let {

            it.getLensInformation(object: CommonCallbacks.CompletionCallbackWith<String>{
                override fun onSuccess(p0: String?) {
                    Log.d("Wind", "lens info : ${p0!!}")
                }

                override fun onFailure(p0: DJIError?) {
                    Log.d("Wind", "lens info failed : ${p0!!.description}")
                }

            })

            it.setMediaFileCallback(this)
            it.setMode(SettingsDefinitions.CameraMode.SHOOT_PHOTO, {
                if (it != null) {
                    Log.e("Wind", "Error set mode")
                }
            })
        }

        DemoApplication.getAircraftInstance().flightController.flightAssistant!!.setVisionControlStateUpdatedcallback {
            DemoApplication.getAircraftInstance().flightController.flightAssistant!!.setVisionDetectionStateUpdatedCallback {
                it.isSensorBeingUsed
                distance0 = if (it.detectionSectors.indices.contains(0)) {
                    it.detectionSectors[0].obstacleDistanceInMeters
                } else {
                    null
                }

                distance1 = if (it.detectionSectors.indices.contains(1)) {
                    it.detectionSectors[1].obstacleDistanceInMeters
                } else {
                    null
                }

                distance2 = if (it.detectionSectors.indices.contains(2)) {
                    it.detectionSectors[2].obstacleDistanceInMeters
                } else {
                    null
                }

                distance3 = if (it.detectionSectors.indices.contains(3)) {
                    it.detectionSectors[3].obstacleDistanceInMeters
                } else {
                    null
                }
                val distances = floatArrayOf(distance0!!, distance1!!, distance2!!, distance3!!)
                val isLarger0 = distances.filter {
                    it > 0
                }
                distance = if (isLarger0.all { it <= 0.0F }) {
                    0F
                } else {
                    isLarger0.min()!!
                }
            }

        }

        DemoApplication.getAircraftInstance().flightController.setStateCallback {
            verticalClimb = if (it.velocityZ == 0F) {
                0f
            } else {
                it.velocityZ
            }

            flightCurrentLocation = it.aircraftLocation
            currentAltitude = flightCurrentLocation!!.altitude

            currentHeading = it.aircraftHeadDirection
        }

        btnCLimbUp.setOnClickListener(this)
        btnDescent.setOnClickListener(this)
    }
  • test using crystalsky system version 02.05.00.00
compileSdkVersion` 26
    buildToolsVersion '26.0.2'
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        // Enabling multidex support.
        multiDexEnabled true
        ndk {
            abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a'
        }
    }

  • DJI Product is Mavic pro and M210 + olympus 45mm m. zuiko
  • Android studio version 3.1.1
  • Code is edited from UILibrary sample code

Thank you

2018-04-25 18 29 35

PreFlightStatusWidget not updating

PreFlightStatusWidget keeps displaying Disconnected after connection to drone. Drone is definitely connected because can read telemetry data.

If I then "refresh" the activity by for example rotating the screen orientation then the widget gets updated and displays correct information.

This has been an issue since version 4.3.2

Some widgets do not scale on changing layout width and height

The dji.ui.widget.BatteryWidget and the dji.ui.widget.ConnectionWidget do not scale up on increasing the layout width and height (even while maintaining the expected aspect ratio).
The connection widget icon stays the same size and just repositions to the top of the new dimensions, while the battery widget icon scales up as expected but the battery widget text does not scale and just repositions to the top of the widget. Here are the images for the same -
Correctly displaying widgets when layout_height is set to 25dp -
correct_25dp

Incorrectly displaying widgets when layout_height is set to 50dp -
incorrect_50dp

I had the parameters for both of these set as follows (following the recommended aspect ratios) -

          <dji.ui.widget.BatteryWidget
            android:layout_width="128dp"
            android:layout_height="50dp"/>
        <dji.ui.widget.ConnectionWidget
            android:layout_width="50dp"
            android:layout_height="50dp"/>

I am using the Android UI Library 4.1.1 with the DJI Inspire 1 on a Nexus 7 tablet running Android 6.0.1.
The Android Studio version is 2.3.3.

Grid lines

Is there a way we can add grid lines UI like the DJI GO app?

start waypoint mission with the takeoff widget

The samples give a simple explanation how to do minor modifications on the DJI widgets.

I would like to use the takeoff widget to start my own waypoint mission. But I do not understand how to start a mission (defined in the MainActivity class) from a custom DJI Widget class.

What is the correct way to interact with the MainActivity from a custom DJI widget?

R - for RTK showing inappropriately

The GPS signal widget shows a small 'r' for rtk enabled even if rtk is not enabled.

Also another small item. In the camera control widget - the menu button, at the top of the control, text color is black making this very hard to see. The color should default to white or near white to match the bottom button used to control the exposure settings.

Using ui library 4.1.1
Phantom 4 pro
Android 7
nVidia k1 shield
Android 2.3

Why Radar widget is not working in Mavic_2?

DJI MSDK:4.8.1

platform:Android

Radar widget is not working properly in Mavic_2 where as it works fine in other drones (Mavic_pro,Mavic_air). Is there anything we need to handle so that it works fine in Mavic_2?

I have also raised a question in stackoverflow but no one has responded yet.

Compass widget - memory leaks

Leak Canary is reporting that the compass widget is leaking the activity context.

To reproduce add the compass widget or the dashboard widget to a program using Android UI library 4.4.1.

Phantom 4 pro, Crystal sky, latest version of android studio, not using UI sample code.

Some problem in dji.ui.widget.BatteryWidget

I use uilibrary 4.2 in my application and when i create the view with dji.ui.widget.BatteryWidget it crashed. But it no happend in uilibrary 4.0.

Error Code

java.lang.NoSuchFieldError: No static field textview_battery_voltage of type I in class Ldji/ui/R$id; or its superclasses (declaration of 'dji.ui.R$id' appears in /data/app/com.ynhere.flightcommand-1/base.apk:classes10.dex)

  • phone: oneplus x
  • DJI Produc: M100
  • Android studio :2.3.3

Trying to run the sample :

Error in Messages:

C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\layout\widget_exposure_mode_setting.xml
Error:(20, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
Error:(41, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
Error:(56, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
Error:(71, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\layout\widget_exposuresetting.xml
Error:(9, 29) No resource found that matches the given name (at 'background' with value '@drawable/selector_camera_control_exposure_setting').
Error:(17, 22) No resource found that matches the given name (at 'src' with value '@drawable/camera_controll_exposure_mode_p').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\layout\widget_style_view.xml
Error:(19, 22) No resource found that matches the given name (at 'src' with value '@drawable/ic_cam_setting_digitalfilter_blackandwhite').
Error:(27, 22) No resource found that matches the given name (at 'src' with value '@drawable/ic_cam_setting_digitalfilter_saturation').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_arrow_button.xml
Error:(5, 27) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_setting_back_arrow_highlight').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_camera_auto_exposure_mode.xml
Error:(6, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_exposure_mode_auto_highlight').
Error:(11, 27) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_exposure_mode_auto_normal').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_camera_control_recordvideo.xml
Error:(8, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_controll_recordvideo_select').
Error:(13, 27) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_controll_recordvideo_nor').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_camera_control_stopvideo.xml
Error:(8, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_controll_stopvideo_select').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_camera_exposure_mode_setting.xml
Error:(5, 32) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_exposure_mode_setting_selector_bg').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_list_item.xml
Error:(6, 29) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_selected_item_background').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_other_tab.xml
Error:(6, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_settings_other_highlight').
Error:(11, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_settings_other_highlight').
C:\Users\jayakrishnan1234\.android\build-cache\6babaec58f648d1a1d965cb8c0437de63e9e3b65\output\res\drawable\selector_right_arrow_button.xml
Error:(7, 31) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_setting_back_arrow_highlight').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\layout\widget_exposure_mode_setting.xml
Error:(20, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
Error:(41, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
Error:(56, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
Error:(71, 32) No resource found that matches the given name (at 'textColor' with value '@drawable/selector_camera_exposure_mode_text_color').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\layout\widget_exposuresetting.xml
Error:(9, 29) No resource found that matches the given name (at 'background' with value '@drawable/selector_camera_control_exposure_setting').
Error:(17, 22) No resource found that matches the given name (at 'src' with value '@drawable/camera_controll_exposure_mode_p').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\layout\widget_style_view.xml
Error:(19, 22) No resource found that matches the given name (at 'src' with value '@drawable/ic_cam_setting_digitalfilter_blackandwhite').
Error:(27, 22) No resource found that matches the given name (at 'src' with value '@drawable/ic_cam_setting_digitalfilter_saturation').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_arrow_button.xml
Error:(5, 27) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_setting_back_arrow_highlight').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_camera_auto_exposure_mode.xml
Error:(6, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_exposure_mode_auto_highlight').
Error:(11, 27) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_exposure_mode_auto_normal').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_camera_control_recordvideo.xml
Error:(8, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_controll_recordvideo_select').
Error:(13, 27) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_controll_recordvideo_nor').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_camera_control_stopvideo.xml
Error:(8, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_controll_stopvideo_select').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_camera_exposure_mode_setting.xml
Error:(5, 32) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_exposure_mode_setting_selector_bg').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_list_item.xml
Error:(6, 29) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_selected_item_background').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_other_tab.xml
Error:(6, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_settings_other_highlight').
Error:(11, 37) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_settings_other_highlight').
C:\Users\jayakrishnan1234\Documents\Mobile-SDK-Android-71519123388eb2cbb516964df14f48267276144e\Mobile-UILibrary-Android-master\Mobile-UILibrary-Android-master\sample\app\build\intermediates\res\merged\debug\drawable\selector_right_arrow_button.xml
Error:(7, 31) No resource found that matches the given name (at 'drawable' with value '@drawable/camera_setting_back_arrow_highlight').

Not possible to build apk with UILibrary

Hey,

i got a problem if i want to build my apk.

The following error is thrown:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/gson/stream/MalformedJsonException.class

That are my dependencies:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':dji-sdk')
compile project(':dji-uilib-release-4.0.1.1.0.0')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.google.android.gms:play-services-places:10.2.0'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services-analytics:10.2.0'
compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'com.google.guava:guava:20.0'
compile 'commons-io:commons-io:2.5'
compile 'org.jetbrains:annotations-java5:15.0'
compile 'com.robinhood.spark:spark:1.1.2'
compile 'com.opencsv:opencsv:3.8'
}

Can you help me to solve the problem, otherwise I'm not able to use the UI Library.

Regards
Maestro

The FPVWidget is very unstable using this UILibrary on Phantom 4 Pro

FPVWidget is very unstable and the screen blurred badly when something is moving in front of the camera.

But every time I press shutter button on remote controller, the FPV becomes quite clear at that moment. Then after a second it returns blurred. Using DJI GO4 and sdk3.5 is all good.

Focus widget

On iOS there is a widget for displaying the current focus point, DULFocusTargetWidget (green square with current focus mode on the bottom, e.x AF) I couldn't find anything in the UI SDK for Android for this, is there some setting I'm missing? Right now tapping on the screen will show it briefly but I always want to show it.

Using version 4.3.2
Galaxy S7
P4 PRO

Cannot use Android Layout editor with widgets

The sample itself cannot show the widgets (see below output in Android Studio) and this makes it very difficult to design UI using the widgets.

The following classes could not be instantiated:
- dji.ui.widget.FPVOverlayWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.config.CameraConfigWBWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.panel.PreFlightCheckListPanel (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.VideoSignalWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.TakeOffWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.panel.CameraSettingAdvancedPanel (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.config.CameraConfigISOWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.FocusModeWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.AutoExposureLockWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.config.CameraConfigEVWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.PreFlightStatusWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.CameraConfigStorageWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.RemoteControlSignalWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.controls.CameraControlsWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.panel.CameraSettingExposurePanel (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.config.CameraConfigApertureWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.FPVWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.GPSSignalWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.FocusExposureSwitchWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.VisionWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.BatteryWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.ReturnHomeWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.RemainingFlightTimeWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.dashboard.DashboardWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.FlightModeWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.WiFiSignalWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.config.CameraConfigShutterWidget (Open Class, Show Exception, Clear Cache)
- dji.ui.widget.ConnectionWidget (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.VerifyError: Expecting a stackmap frame at branch target 18 Exception Details: Location: dji/ui/base/a.onLayout_Original(ZIIII)V @8: ifnull Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2ab6 0060 3a06 1906 c600 0a2a b400 20c7 0x0000010: 0011 2a1b 1c1d 1504 1505 b700 a2a7 004a 0x0000020: 1906 b600 7f3a 0719 07c6 003e 0336 0815 0x0000030: 082a b400 20b6 0082 a200 2f19 0715 0832 0x0000040: 3a09 1909 c100 849a 001a 2ab4 0020 1508 0x0000050: b600 88c0 000d 3a0a 1906 190a 1909 b600 0x0000060: a584 0801 a7ff cbb1   at java.lang.Class.getDeclaredConstructors0(Class.java:-2)   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)   at java.lang.Class.getConstructor0(Class.java:3075)   at java.lang.Class.getConstructor(Class.java:1825)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)   at android.view.LayoutInflater.inflate(LayoutInflater.java:518)   at android.view.LayoutInflater.inflate(LayoutInflater.java:397) Copy stack to clipboard

Problem with Asus Memo Pad 8

Hey everybody,

i could get your sample ui app running on my nexus 5 without any problems!

But for developing i normally use a Asus Memo Pad8, with the following features:

  • Intel® Atom™ Z3560 up to 1.83 GHz, Quad-Core
  • 2GB Ram

Unfortunately i get always directly after startup an error message that the app crashed.
Within the log i just get the following information in Android Studio:

06-10 15:41:58.916 21444-21444/? I/art: Late-enabling -Xcheck:jni
06-10 15:41:58.976 21444-21444/com.dji.ui.sample W/ResourcesManager: Asset path '/system/framework/com.android.future.usb.accessory.jar' does not exist or contains no resources.
06-10 15:41:58.986 21444-21444/com.dji.ui.sample V/Monotype: SetAppTypeFace- try to flip, app = com.dji.ui.sample
06-10 15:41:58.986 21444-21444/com.dji.ui.sample V/Monotype:     Typeface getFontPathFlipFont - systemFont = default#default
06-10 15:41:58.996 21444-21444/com.dji.ui.sample W/linker: libffmpeg.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
06-10 15:41:58.996 21444-21444/com.dji.ui.sample A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x700c3690 in tid 21444 (m.dji.ui.sample)
06-10 15:41:59.006 21444-21454/com.dji.ui.sample A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x12c04001 in tid 21454 (JDWP)

Hopefully you can help my with my problem!

Regards
xxmaestroxx

Gimbal position

Is there a way to add an indicator of the gimbal position, like below

Update and compile Mobile-UILibrary-Android to use newer version of Android Support Libraries (v26.1.0)

Description: The Mobile-UILibrary is currently broken for all apps that do not target v24.2.0 and causes frequent intermittent crashes. See the following error message from Studio below:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 26.1.0, 24.2.0. Examples include com.android.support:animated-vector-drawable:26.1.0 and com.android.support:recyclerview-v7:24.2.0 less...
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)

Can you please update and recompile the library provided by the Maven repo to use the latest version?

  • Steps to reproduce the bug or crash issues(It would be great if you can provide this):
    Use a fresh install of the newest version of Android Studio and any version of the Android SDK that is newer than v24.2.0
  • Crash logs (If you can find it, it would be very helpful):
    See above error message.
  • DJI Android UILibrary version you are using (Like Android UILibrary 4.0.1.1.0.0, etc):
    Latest version available from Maven repo and we're using is 4.3.2.
  • DJI Product you are using (Like Phantom 4, Mavic Pro, etc):
    Mavic Pro, but really doesn't matter in this case.
  • Android system version you are using (Like Android 6.0.1, Android 5.1.1, etc)
    Android versions 25, 26, and 27 are all effected by this issue.
  • Android device you are using (Like Samsung Galaxy Note 5, Nexus 5, etc)
    Google Pixel XL 128 GB.
  • Android Studio version you are using (Like Android Studio 2.2, etc)
    Android Studio 3.0 (Stable).
  • Are you using UILibrary Sample Code (Yes/No)?
    Yes
  • If the answer of previous one is No, please specify which elements of UILibrary are you using.
    N/A
    screen shot 2017-10-30 at 4 33 57 pm

duplicate entry of nineoldandroids

Env:
Android studio 2.3.1

compile error:

Error:Execution failed for task ':Android:transformClassesWithJarMergingForRelease'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/nineoldandroids/animation/Animator$AnimatorListener.class

widgets unable to adjust width and height?

Is this issue about bugs or crash issues of DJI Android UILibrary and Sample Code?

Yep, then please delete this template and provide the following infos for us to help investigate the issue:

  • Description of the issue.
  • Steps to reproduce the bug or crash issues(It would be great if you can provide this)
  • Crash logs (If you can find it, it would be very helpful)
  • DJI Android UILibrary version you are using (Like Android UILibrary 4.0.1.1.0.0, etc)
  • DJI Product you are using (Like Phantom 4, Mavic Pro, etc)
  • Android system version you are using (Like Android 6.0.1, Android 5.1.1, etc)
  • Android device you are using (Like Samsung Galaxy Note 5, Nexus 5, etc)
  • Android Studio version you are using (Like Android Studio 2.2, etc)
  • Are you using UILibrary Sample Code (Yes/No)?
  • If the answer of previous one is No, please specify which elements of UILibrary are you using.

Is this issue about DJI iOS UILibrary and Sample Code?

Then this is the wrong place, please refer to the Mobile-UILibrary-iOS Github: https://github.com/dji-sdk/Mobile-UILibrary-iOS/issues

BatteryWidget问题

使用UX SDK版本是:4.10
无人机使用:经纬600 A3
使用UX的DEMO链接上无人机后,发现其他都功能都点亮正常,电量一直都是N/A状态。
就想问下这是什么情况?

Conflicts with RxAndroid and RxJava

Is this issue about bugs or crash issues of DJI Android UILibrary and Sample Code?

Yep, then please delete this template and provide the following infos for us to help investigate the issue:

  • Description of the issue.

Unable to use rxjava and rxandroid with dji sdks
Gradle build fails
If I remove the dependencies for rxandroid and rxjava it builds

  • Steps to reproduce the bug or crash issues(It would be great if you can provide this)
    Import dji-sdk.arr
    Import dji-uilibrary.aar

add these two lines to app level build.gradle

    compile project(':dji-uilibrary')
    compile project(':dji-sdk')

Also include these dependencies in app level build.gradle

    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
    compile 'io.reactivex.rxjava2:rxjava:2.1.0'
  • Crash logs (If you can find it, it would be very helpful)
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties
	File1: C:\Users\...\.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.1.0\2fdf84dedcaaeabb9d70cde9dbb8aad4eccb80a1\rxjava-2.1.0.jar
	File2: C:\Users\...\.android\build-cache\7938631c11c2469da0e1ebd1454f8d40a6068f8b\output\jars\classes.jar
  • DJI Android UILibrary version you are using (Like Android UILibrary 4.0.1.1.0.0, etc)

DJI Android UILibrary v4.2.1

Also using dji-sdk.aar from the same folder as dji-uilibrary.aar

  • Android Studio version you are using (Like Android Studio 2.2, etc)

Android Studio 2.3.3

dji.ux.widget.PreFlightStatusWidget incorrectly reports signal interference for Mavic Air

  • When using the dji.ux.widget.PreFlightStatusWidget, it continually reports "Strong signal interference" when connected to the Mavic Air. When checking in DJI GO or even viewing the Wifi, RC and VideoSignalWidgets in the ux toolkit, it's clear that this is not true. I have also tried flying in very radio quiet areas on a remote farm and it still reports strong interference.

I believe the widget is not reading the signal strength for the Air as it uses Wifi rather than Lightbridge or Ocusync as per other models, and hence incorrectly assumes there is no signal.

  • Steps to reproduce the bug or crash issues(It would be great if you can provide this)
    No crash, just connect to a Mavic Air and view the dji.ux.widget.PreFlightStatusWidget.

  • DJI Android UILibrary version you are using (UXLibrary v4.5)

  • DJI Product you are using (Mavic Air)

  • Android system version you are using (All versions of Android - tested on 6, 7 and 8.1)

  • Android device you are using (several devices, Huawei media pad M3, Nexus 6P, Samsung Tab A, Samsung S7 phone, Samsung S2 tablet)

  • Android Studio version you are using (v 3.1.1)

  • Are you using UILibrary Sample Code (No)

The FpvWidget is not showing live view in Phantom 4 Advanced.

Platform: Android 5.1.1
Android device: Epson Glasses BT-350
SDK: 4.5.1
Device Phantom 4 Advanced

The FpvWidget does not show live view in Phantom 4 Advanced.
Note 1: Once I click a picture , Fpvwidget starts to show live view.
Note 2: If I change the camera mode to MediaDownload and back to ShootPhoto , FpvWidget starts to show live view.

Note 3: If I put the app in background and then launch , again the live view disappears.
Note 4: This happens only in Release build and works fine in Debug build. I tried disabling pro guard but it doesn't help.

It would be really helpful to know some feedback on this issue.

PS: In normal Android devices it works fine, this happens only in Epson BT-350 glasses.

New version of SDK 4.2

Hi everybody,

when do you expect the update of the mobile ui library because of the sdk update to 4.2?

Regards
xxmaestroxx

Please update the version of com.google.android.gms:play-services-location in the UX library

The 4.5 version of the UX library includes mapping functions. There is a dependency on com.google.android.gms:play-services-location inside the library.

In the latest version of Android studio (3.1.1), the compiler is much stricter and when building the dex archives for my app, I get an error "Program type already present: com.google.android.gms.location.places.zzl"

This is a new an extremely frustrating error that Android Studio 3.1.1 seems to cause quite a bit. The cause is two libraries being imported that both reference a 3rd library (in this case the play-services-location library). The only solution I've found is to remove one of the libraries.

However, in this case, I can't do that as the version of play-services-location and play-services-places used by the UX library are ancient (v9.4.0), while the rest of my app is using the latest google libraries, v12.0.1.

Would it be possible to update the UX library to use 12.0.1?

ux

Is this issue about bugs or crash issues of DJI Android UILibrary and Sample Code?

Yep, then please delete this template and provide the following infos for us to help investigate the issue:

  • Description of the issue.
  • Steps to reproduce the bug or crash issues(It would be great if you can provide this)
  • Crash logs (If you can find it, it would be very helpful)
  • DJI Android UILibrary version you are using (Like Android UILibrary 4.0.1.1.0.0, etc)
  • DJI Product you are using (Like Phantom 4, Mavic Pro, etc)
  • Android system version you are using (Like Android 6.0.1, Android 5.1.1, etc)
  • Android device you are using (Like Samsung Galaxy Note 5, Nexus 5, etc)
  • Android Studio version you are using (Like Android Studio 2.2, etc)
  • Are you using UILibrary Sample Code (Yes/No)?
  • If the answer of previous one is No, please specify which elements of UILibrary are you using.

Is this issue about DJI iOS UILibrary and Sample Code?

Then this is the wrong place, please refer to the Mobile-UILibrary-iOS Github: https://github.com/dji-sdk/Mobile-UILibrary-iOS/issues

Compass Calibration WorkFlow

Hi

I would really appreciate some feedback on the CompassCalibrationWorkflow class in the Android UI library. My understanding of documentation DJI UI reference is that calling startCalibration will bring up a dialog which guides the user through the calibration process. However, when I call this method nothing is displayed. Below is how I am currently implementing this.

CompassCalibratingWorkFlow.startCalibration(new ActionCallback() {
        @Override
        public void onSuccess() {
        }
        @Override
        public void onFailure(@NonNull DJIError djiError) {
        }
    });

I am I using this incorrectly or is this a bug in the library?

My setup:
DJI Android SDK version: 4.3.2
DJI UI Library version: 4.3.2
Android system versions: 7.0, 5.0
DJI product: Phantom 4, Mavic Pro

MapWidget crash issue while using on Fragment.

Library Version: 4.6

Code:

public class HomeFragment extends Fragment {

    private MapWidget mapWidget;

    public HomeFragment() {
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.fragment_home, container, false);
        mapWidget = inflate.findViewById(R.id.map_widget);
        mapWidget.initGoogleMap(new MapWidget.OnMapReadyListener() {
            @Override
            public void onMapReady(@NonNull DJIMap djiMap) {
            }
        });
        return inflate;
    }

    @Override
    public void onResume() {
        super.onResume();
        mapWidget.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
        mapWidget.onPause();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        mapWidget.onDestroy();
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        mapWidget.onLowMemory();
    }
}

Crash:

Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.google.maps.api.android.lib6.impl.bo.o()' on a null object reference
at com.google.maps.api.android.lib6.impl.cw.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040306-204998136):21)
at com.google.android.gms.maps.internal.w.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040306-204998136):12)
at fc.onTransact(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040306-204998136):12)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.internal.zzeu.zzb(Unknown Source)
at com.google.android.gms.maps.internal.zzk.onResume(Unknown Source)
at com.google.android.gms.maps.MapView$zza.onResume(Unknown Source)
at com.google.android.gms.dynamic.zzh.zzb(Unknown Source)
at com.google.android.gms.dynamic.zzb.zza(Unknown Source)
at com.google.android.gms.maps.MapView$zzb.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onResume(Unknown Source)
at com.google.android.gms.maps.MapView.onResume(Unknown Source)
at dji.ux.widget.MapWidget.onResume(Unknown Source)
at com.xxx.xxx.HomeFragment.onResume(HomeFragment.java)

onSurfaceTextureUpdated null pointer

[Transferred post from the forum, which I understand is no longer used to report bugs?]

Hi,

We've run across a bug in the Android UI library (using 4.4.1) that causes a crash due to a null pointer exception when we're using the UI library FPV Widget? Our app has one of these widgets on its main activity right from the start, so it seems to be that if the view is switched (e.g. landscape -> portrait mode) or we go to another view and then back again, there is a null pointer exception in onSurfaceTextureUpdated, which is trying to access this.codecManager before it is initialised?
We have fixed this by deriving our own class and overriding this function, but it would be better to be sorted in the library! Also, there may be other similar instances that we have not yet run across.
Here's an extract from our fix:

public class WOCOFPVWidget extends FPVWidget {

@OverRide
public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {

if( this.codecManager != null ) {
    super.onSurfaceTextureUpdated(surfaceTexture);
}

}
}

Thanks,

William

Yellow exposure icon showing incorrectly.

When using the standard set of ux elements including the green auto focus icon and the yellow exposure icon, the yellow exposure icon is displayed when it should be hidden.

To reproduce, change the selection tool to focus, as shown by a green box on the toolbar. At this point the yellow exposure circle icon also shows when it should be hidden.

The green focus square shows appropriate and the correct focus is taken, but the round yellow auto exposure is show inappropriately.

DJI SDK ux 4.5
crystal sky - latest firmware
android studio - 3.1.2

Install failed insufficient storage

Trying to run this example on API 28 Tablet emulator when got this error, Install_failed_insufficient_storage, on my AndroidStudio.
I did not change code or gardle script (Just unmarked the exclude module: 'library-anti-distortion' line in order to reduce apk size).

Roadmap for the UI library

Not an issue but could DJI publish a roadmap on what we can expect in new capabilities for the UI library? Perhaps capabilities by quarter - roughly?
I'm curious on how developed the UI library will become.

FPVWidget not resizing correctly

The FPVWidget is not resizing correctly (i.e. when width is set to "match_parent" in a full screen layout element it is not covering the full width of the screen).
I have just included the widget in my xml file as follows -

       <dji.ui.widget.FPVWidget
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"/>
        <dji.ui.widget.FPVOverlayWidget
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"/>

I have instantiated the FPVWidget in the activity and resize the window on clicking a toggle switch. On resizing it I have the layout parameters as follows -

final FrameLayout.LayoutParams fpvLayoutParams = new FrameLayout.LayoutParams(
    ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT
);

I apply these parameters to the widget view using view.setLayoutParams(fpvLayoutParams).
There are no crashes in the logcat but the resizing does not work as expected. I also tried using the CameraLiveView in the XML without configuring it separately as mentioned here but that did not work at all.
DJI Android UI-Library v4.4.1 and Mobile SDK v4.4.1
Testing with a DJI Inspire 1 v2 and a Lenovo Tab 4 8 Plus Tablet
Android v7.1.1
Android Studio v3.0.1
Not using the sample code to do this - I have specified the elements causing the issues.

MF/AF widget and the AE lock behavior

When clicking the manual focus icon, then shouldn't a slider be presented to the user to allow the user to choose between close-up and infinity focus as in the DJI Go 4 app? Or is this behavior left to us to include. Currently after choosing MF, the autofocus green target box displays on the screen and this target box should not display when choosing MF.

Also after choosing the AE lock, and the selecting the yellow AE icon, a message should display that the exposure cannot be changed. Instead the yellow AE target continues to display.

Using DJI UI version 4.1.1
nVidia k1 shield.
Android 7.0
Android Studio - 2.3.3
Using the UI widgets but not the sample code.

Sample not connected on XiaoMi 6 and 8, Android 8.0.0 & 8.1.0 as DJI GO 4 works well.

The Sample are successfully connected and shown on HUAWEI Mate9 with Android version 8.0.0.
But it failed on XiaoMi 6 and XiaoMi 8, with android version 8.0.0 and 8.1.0.
I am using DJI UILibrary 4.5 and also checked version 4.3.2, both failed.
The DJI GO 4 can connected successfully.
After the cable connected and I did choose the correct app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.