dji-mobile-sdk-tutorials / android-uxsdkdemo Goto Github PK
View Code? Open in Web Editor NEWThis demo is designed for you to gain a better understanding of the DJI Android UX SDK.
License: MIT License
This demo is designed for you to gain a better understanding of the DJI Android UX SDK.
License: MIT License
想做类似djigo那样, 地图与画面可以切换。
画面控件示例里面已经找到,但是没找到地图控件。
Using Android Studio 3.2
Emulator: Pixel running API 27
This happens in both the UXSDKDemo and the sample.UX.SDK apps.
Side Note:
It doesn't appear as if the developers of these demos are using the latest Android Studio (3.2) or Build Tools (28). The demos require a lot of tweaks to the gradle files to even compile them. Please keep your software up to date! Thanks!
Stack Trace:
2018-10-02 15:20:19.584 4336-4336/com.dji.uxsdkdemo I/InstantRun: starting instant run server: is main process
2018-10-02 15:20:19.614 4336-4336/com.dji.uxsdkdemo E/linker: "/data/app/com.dji.uxsdkdemo-Dlc2GPwBk6IhtAWGOTyhnQ==/lib/x86/libffmpeg.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)
2018-10-02 15:20:19.615 4336-4336/com.dji.uxsdkdemo W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.dji.uxsdkdemo-Dlc2GPwBk6IhtAWGOTyhnQ==/lib/x86/libffmpeg.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)
2018-10-02 15:20:19.616 4336-4336/com.dji.uxsdkdemo W/System.err: at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
2018-10-02 15:20:19.616 4336-4336/com.dji.uxsdkdemo W/System.err: at java.lang.System.loadLibrary(System.java:1657)
2018-10-02 15:20:19.616 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.midware.natives.SDKRelativeJNI.(Unknown Source:2)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.midware.natives.SDKRelativeJNI.native_getXXXX(Native Method)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.g.a.a.b.a(Unknown Source:24)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.g.a.a.b.a(Unknown Source:5)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.sdk.sdkmanager.DJISDKManager.(Unknown Source:2)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.uxsdkdemo.DemoApplication.onCreate(DemoApplication.java:66)
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.uxsdkdemo.MApplication.onCreate(MApplication.java:24)
2018-10-02 15:20:19.618 1659-2714/system_process W/ActivityManager: Background start not allowed: service Intent { cmp=com.google.android.videos/.service.pinning.TransferService (has extras) } to com.google.android.videos/.service.pinning.TransferService from pid=4352 uid=10074 pkg=com.google.android.videos
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread.-wrap1(Unknown Source:0)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.os.Looper.loop(Looper.java:164)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6494)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2018-10-02 15:20:19.620 4336-4336/com.dji.uxsdkdemo E/zygote: No implementation found for byte[] dji.midware.natives.SDKRelativeJNI.native_getXXXX(java.lang.String) (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX and Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX__Ljava_lang_String_2)
2018-10-02 15:20:19.623 4336-4336/com.dji.uxsdkdemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.dji.uxsdkdemo, PID: 4336
java.lang.UnsatisfiedLinkError: No implementation found for byte[] dji.midware.natives.SDKRelativeJNI.native_getXXXX(java.lang.String) (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX and Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX__Ljava_lang_String_2)
at dji.midware.natives.SDKRelativeJNI.native_getXXXX(Native Method)
at com.dji.g.a.a.b.a(Unknown Source:24)
at com.dji.g.a.a.b.a(Unknown Source:5)
at dji.sdk.sdkmanager.DJISDKManager.(Unknown Source:2)
at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)
at com.dji.uxsdkdemo.DemoApplication.onCreate(DemoApplication.java:66)
at com.dji.uxsdkdemo.MApplication.onCreate(MApplication.java:24)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2018-10-02 15:20:19.632 1659-2491/system_process W/ActivityManager: Force finishing activity com.dji.uxsdkdemo/.MainActivity
Hello DJI
i write this question in stackoverflow
i want to add acceleration x in the front of application , when i installed the application the Result of accX
diplay NAN
, you can see in this image the result of acceleration X ,
The question is : how can be display the value of acceleration and remove the value NAN
?
UI Widgets missing in 4.8 working on 4.7 branch with android studio 3.2.1 in the layout editor.
Component tree shows them but not visible in studio.
Hello I decompiled the project on my samsung galaxy 10.1"note 2014.
Reading battery state: ok
If I want to start the aircraft with the 1 meter hover function the mavic air don't recieve the command.
I recently update all my firmware's for the mavic air to the last update's.
How can I fix this?
Thanks in advance
Gino
android app开发中,将使用MSDK和UXSDK由V4.8升级到V4.10(或者V4.9)时,程序编译报错:..\app\build\intermediates\exploded-aar\com.dji\dji-uxsdk\4.10\res\layout\layout_manual_focus_widget.xml
Error:(27, 35) No resource found that matches the given name (at 'layout_above' with value '@id/vertical_wheel_max').
该怎么解决? gz#24813
Hello, I'm having troubles with UI SDK. I haven't tried exactly this sample. I have my own app, where I'm using exactly the same layout. I always get the following error:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Integer dji.sdk.codec.DJICodecManager.getVideoHeight()' on a null object reference
It always happen if the device is not connected to the controller and activity is paused and then resumed (starting new activity and then go back, put the app to background and then back)
Full log here.
Could you please help out?
Installation failed with message Failed to finalize session : INSTALL_FAILED_MISSING_SHARED_LIBRARY: Package couldn't be installed in /data/app/uxsdkdemo.dji.com.uxsdkdemo-l9gVWo4izq_fP6SusITP4g==: Package uxsdkdemo.dji.com.uxsdkdemo requires unavailable shared library com.android.future.usb.accessory; failing!.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
I get this warning when i try and run the application.
I tried removing <uses-library android:name="com.android.future.usb.accessory" />
as suggested on another forum and while this allowed the app to install on the AVD it caused the app to crash after requesting permissions.
Android studio 3.1.1 Failed to resolve: multidex
异常信息,java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at dji.internal.useraccount.a.a.b(Unknown Source:39)
at dji.internal.useraccount.a.a.onCreate(Unknown Source:3)
at android.app.Dialog.dispatchOnCreate(Dialog.java:528)
at android.app.Dialog.show(Dialog.java:389)
at dji.internal.useraccount.a$4.run(Unknown Source:15)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
由于看不见源码,无法定位异常原因。
when i open the project with android studio : its give me this error :
Failed to resolve: com.dji:dji-uxsdk:4.13.1
Show in Project Structure dialog
Affected Modules: app
UXSDK能不能有像DJI Pilot App中manual flight那样的设置组件(右上角)?
Hello,
I've been attempting to follow this demo, but I've been having the application crash no matter what I do. I've added logs and sleeps to the on create method to try and verify where it crashes, and the crash is given before the logs/sleeps even come into play. Based on this, and the error logs which display only on the android hardware/library code when I plug it into a phone, I think there may be some kind of incompatible code with new android software for android studio.
Hopefully this helps, and I look forward to hearing on this issue soon.
I have build the UXSDKDemo. Everything is working fine.
When i go to menu > setting > histogram
Histogram is not appearing
I tried it multiple times under different environments.
Hi, I'm having trouble getting the UILibrary Demo to run on my device.
Steps to reproduce the bug or crash issues(It would be great if you can provide this)
FATAL EXCEPTION: main Process: com.dji.uilibrarydemo, PID: 15650 java.lang.NullPointerException: Attempt to invoke virtual method 'dji.midware.data.config.P3.ProductType dji.midware.data.manager.P3.DJIProductManager.c()' on a null object reference
Logcat File has been attached here logcat.txt
Crash File has been attached here: crash.txt
Could you please help out?
DemoApplication里registerApp(getApplicationContext(), mDJISDKManagerCallback),这里mDJISDKManagerCallback为null,mDJISDKManagerCallback是在后面new的,请问是SDK内通过其他方式调用了registerApp吗?当我先new mDJISDKManagerCallback再registerApp(getApplicationContext(), mDJISDKManagerCallback),这时候一直报错Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.Context.getTheme()' on a null object reference
Hello
Im trying to run this sample, it builds and compile without any problem but registering methods are never called...
and yes i create an app in my account with the correct package name, platform and put the app key in AndroidManifest and my device has internet connection and i see no related errors in logcat..... what can be the cause???
Thanks
Recently updated to 4.10, and then had to change my project to suit it. I removed the "old way" of putting the camera in (TextureView), with this new "easy" way of just inserting FPVWidget
into my xml.
Now there's text rendered on top of my camera view, with the words "Phantom 4 Camera" (I'm using a Phantom 4). Looks like some sort of debugging assistance, but it's still there when I build my app with release signing.
Looking through the FPVWidget.class file in Android Studio, the text is clearly inserted onto the UI in private void initTextOverlay()
. But I see no method calls for FPVWidget to remove this text.
Is this just supposed to be there all the time? I notice this text is not present in any of the updated tutorial screenshots.
gz#24592
I am trying to modify the UXSDKDemo aplication so that I can send the drones current coordinates in real time to another aplication so I can show it using VR, now in order to do that I first needed to get the coordinates and to make sure they are correct I decided to modify the UXSDKDemo to show them using a toast message but when I did it it just showed the cooridantes as "NaN".
I am not sure if I made some kind of mistake and called the method I made that was getting the coordiantes and the wrong place or maybe it isn't possible to get this information using the UXSDKDemo.
These were the methods (from the DJI SDK) i used in order to get the data.
` FlightControllerState currentState = new FlightControllerState(); `
` LocationCoordinate3D location = currentState.getAircraftLocation(); `
` double lat = location.getLatitude(); `
` double lng = location.getLongitude(); `
` float alt = location.getAltitude(); `
I called my method in the MApplication class, in its onCreate method, like this:
public void onCreate() {
super.onCreate();
demoApplication.onCreate();
demoApplication.showLocation();
};
My biggest concern is that for some reason it is not possible to get the data on longitude, latitude and altitude in the UXSDKDemo, hope you can help me out! Thanks in advance!
APP构建无异常,未连接飞机时无异常,连接飞机后注册成功后程序闪退(当时已经能够拿到FPV画面)
@OverRide
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
Helper.install(this);
if (demoApplication == null) {
demoApplication = new DemoApplication();
demoApplication.setContext(this);
}
}
Helper.install(this);==========一直死在这行代码上,,
Hi,
The Bintray service is not working any more: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
but it is used in the Demo code: UXSDKDemo/app/build.gradle line 5
maven { url 'https://mapbox.bintray.com/mapbox' }
This causes a build error:
Could not HEAD 'https://mapbox.bintray.com/mapbox/com/dji/dji-sdk/4.15/dji-sdk-4.15.pom'. Received status code 403 from server: Forbidden
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.