Coder Social home page Coder Social logo

android-uxsdkdemo's People

Contributors

alainpimentel avatar dji-william avatar oliverou avatar snmillar 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

Watchers

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

android-uxsdkdemo's Issues

UI Library Demo crashing on startup

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)

  • I'm getting the following error:
    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

  • DJI Android SDK 4.3.2
  • DJI Product :DJI Spark
  • Android system version: Android 6.0.1
  • Android device : Nexus 7 (2013)
  • Android Studio version: Android 2.2

Could you please help out?

FPVWidget puts text "Phantom 4 Camera" mid-screen

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

Unable to install APKs

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.

Getting drones altitude, longitude and latitude

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!

DJISDKManager.SDKManagerCallback onRegister

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

UxSDKDemo运行异常

@OverRide
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
Helper.install(this);
if (demoApplication == null) {
demoApplication = new DemoApplication();
demoApplication.setContext(this);
}
}
Helper.install(this);==========一直死在这行代码上,,

how can be calculate the acceleration ( X,Y,Z) of drone

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 ,
image
The question is : how can be display the value of acceleration and remove the value NAN ?

Hisotgram not appearing.

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.

在导入sdk到自己的项目里后,登录dialog弹出失败

异常信息,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)
由于看不见源码,无法定位异常原因。

msdk、uxsdk升级报错

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

Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.Context.getTheme()' on a null object reference

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

Dji mavic air

Hello I decompiled the project on my samsung galaxy 10.1"note 2014.
20180629_025912

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

UXSDKDemo crashes on startup

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

DJICodecManager NullPointerException

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.

  • DJI Android SDK 4.4.1
  • Android system version: Android 8.1.0
  • Android device : Nexus 5x
  • Android Studio version: Android 3.2

Could you please help out?

UI Library crashing

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.

  • Steps to reproduce the bug: download the code from github and run it as described in the tutorial.
  • Android Studio: 3.0
  • DJI Android SDK version you are using : sdk given from tutorial/most recent downloads
  • DJI Product you are using: Mavic Pro (Not connected to studio at the moment)
  • Android system version you are using: Android 6.0.1
  • Android device you are using : Galaxy J2 Prime

Hopefully this helps, and I look forward to hearing on this issue soon.

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.