dji-sdk / mobile-uxsdk-android Goto Github PK
View Code? Open in Web Editor NEWDJI Mobile UXSDK is a suite of product agnostic UI objects that fast tracks the development of Android applications using the DJI Mobile SDK.
License: Other
DJI Mobile UXSDK is a suite of product agnostic UI objects that fast tracks the development of Android applications using the DJI Mobile SDK.
License: Other
https://developer.dji.com/mobile-sdk/documentation/android-tutorials/UILibraryDemo.html
The link to the release aar for the ui library is broken. It was renamed from "android-uilib-release.aar" to "dji-uilibrary.aar". Please update the documentation.
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.
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
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.
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
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)
}
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'
}
}
Thank you
如何设置那些菜单面板的文字信息为中文?
现在PreFlightStatusWidget显示内容都是英文的,想改成中文,看了下发现这些message都是定义在FPVTipLogic类代码中的,建议这些提示定义到string.xml文件中,这样开发者这可以方便的修改
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
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 -
Incorrectly displaying widgets when layout_height is set to 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.
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?
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
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.
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.
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)
java.lang.UnsatisfiedLinkError: Native method not found: dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString:()Ljava/lang/String;
I have entered key, but I can't access APP,why?
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').
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
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.
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
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
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:
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
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?
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
Yep, then please delete this template and provide the following infos for us to help investigate the issue:
Then this is the wrong place, please refer to the Mobile-UILibrary-iOS Github: https://github.com/dji-sdk/Mobile-UILibrary-iOS/issues
使用UX SDK版本是:4.10
无人机使用:经纬600 A3
使用UX的DEMO链接上无人机后,发现其他都功能都点亮正常,电量一直都是N/A状态。
就想问下这是什么情况?
I couldn't find Display Mode widget in https://developer.dji.com/api-reference/android-uilib-api/Widgets/DULFPVWidget.html. Will it be included in the SDK later?
https://dl.djicdn.com/downloads/Mavic_2_Enterprise/20181220/Mavic_2_Enterprise_Series_User_Manual_EN.pdf page 47:
Is there any tutorial on actually processing the events of the ui library after https://developer.dji.com/mobile-sdk/documentation/android-tutorials/UILibraryDemo.html?
For example, I click on the CameraCaptureWidget (the white circle on the right). Right now I have the CameraControlsWidget, but how do I take the picture and get the resulting picture and use it? Am I suppose to create my own onClick listener or is there an existing listener I hook into?
Yep, then please delete this template and provide the following infos for us to help investigate 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
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'
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 v4.2.1
Also using dji-sdk.aar from the same folder as dji-uilibrary.aar
Android Studio 2.3.3
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)
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.
Hi everybody,
when do you expect the update of the mobile ui library because of the sdk update to 4.2?
Regards
xxmaestroxx
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?
Can I display the grid of FPVOverlayWidget without user interactions?
Can we get a UI widget to show how close front and back with the sensors with distance?
https://forum44.djicdn.com/data/attachment/forum/201604/05/204342l1g6yl9j6bi9bgbn.jpg
Yep, then please delete this template and provide the following infos for us to help investigate the issue:
Then this is the wrong place, please refer to the Mobile-UILibrary-iOS Github: https://github.com/dji-sdk/Mobile-UILibrary-iOS/issues
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
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();
}
}
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)
[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
Execuse me,how to use the MapWidget control to add positioning function.
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
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).
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.
Does the UX SDK contain flight control widgets like virtual sticks?
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.