dji-mobile-sdk-tutorials / android-gsdemo-googlemap Goto Github PK
View Code? Open in Web Editor NEWA Demo for using DJI Mobile SDK to create a Waypoint Mission App using Google Map.
License: MIT License
A Demo for using DJI Mobile SDK to create a Waypoint Mission App using Google Map.
License: MIT License
I'm following this sample: https://developer.dji.com/mobile-sdk/documentation/android-tutorials/GSDemo-Google-Map.html
However I see getFlightController is returning null, while mobile is connected to the controller and simulator is running, drone is connected to the mac.
Problem line:
Is there a deeper meaning to why "DJIBaseProduct product = DJIDemoApplication.getProductInstance();" is called so often instead of declaring a private variable DJIBaseProduct, initializing it one time in the onResume method? Or could there be problems?
Thanks for the help :)
Hi,
I am trying to get this work with phantom 3 standard or phantom 3 4k but would not connect to the aircraft. Is it supposed to work with those models?
Thanks!
Hi, I am trying to use this tutorial to make Spark's gps location but not able to access it, even flgihtcontroller class. how to get flightcontroller class from Spark?
Error when trying to start a mission.
Mission Start: The Mission start could not be executed.
Is there a way to use custom coordinates in follow me mission?
smth like DJI:
Double Lat: 33.22345;
Double Lon: 32.5678;
DjiFollowMe(Lat, Lon){
executing the follow me mission
}
Hello is it also possible to import it in Android studio 3.1.1.
Or do you write only in eclipse.
Best regards
Gino
Hello Folks,
We want to fly our drone mavic pro 2 very slow between the waypoint so I am using code i.e.
new WaypointMission.Builder().autoFlightSpeed(3f).maxFlightSpeed(3f)
but it seems it is still very fast. Please let us know how to make this movement very slow.
Thank you for any help you can provide.
Hi I'm new and i don't know how works this tool, sorry if i do some mistake.
I am using the macro of waypoints provided by DJI based on google maps and is supposed that when your mission is ready and uploaded successfully (i reached that point) , as soon as you press start the dron should start flying toward the waypoints with any problem.
But i tried today to do this and i got a problem like "my location was not correct, or what the dron was not able to set its home location".
I am sorry but i can't give you the specific message of the error because the dron is not mine and i can't reproduce again the error maybe until some days later (Moreover i tried to find out the error on the toast messages on the source code but i couldn't).
Is this problem due to some poor receival of GPS signal or it deppends on other issues?
I'm using a DJI phantom 4, android studio 2.2, DJI SDK 4.0.2. ,android version 5.1.1, and device Energy pro 4G.
Thank you beforehand!
Hi, it seems that the altitude is set to a constant when the config is set. Is there a way to set different values for altitude while adding new waypoints to waypointList?
The demo application crashes while booting up on android 4.4.2 with the dji SDK 4.1.1 leaving the following crash report on android studio 2.3.2
06-14 19:45:55.159 15731-15731/com.dji.GSDemo.GoogleMap E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.dji.GSDemo.GoogleMap, PID: 15731
java.lang.UnsatisfiedLinkError: Native method not found: dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString:()Ljava/lang/String;
at dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString(Native Method)
at dji.sdk.sdkmanager.DJISDKManager.(Unknown Source)
at com.dji.GSDemo.GoogleMap.DJIDemoApplication.onCreate(DJIDemoApplication.java:40)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1020)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5154)
at android.app.ActivityThread.access$1500(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1418)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5872)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)
at dalvik.system.NativeStart.main(Native Method)
Hello,
I cannot seem to be able to prepare a mission with only one waypoint. I am trying to create a point and go type application with just one point as a destination.
Is this a bug, or am I missing something?
Thank you in advance,
SK
Which DJI Product you are using?
o DJI Mavic air2 fireware version 01.01.0700, RC 04.11.0032
Which Android Device and Android system version you are using?
o Redmi note10 , Android 11 RKQ1.201022.002
Which Android Studio version you are using?
o Android Studio 2020
A short description of your problem includes debugging logs or screenshots.
o I try to do the project base on Android GSDemo Google map (https://github.com/DJI-Mobile-SDK-Tutorials/Android-GSDemo-GoogleMap) tag DJI Android SDK 4.15 then I need to test. is the demo project work fine? But I found some problem.
o After I clone the demo project, I config the DJI KEY, Google map KEY then run the app demo. The app work fine, can pair the drone but there is some problem.
o I do waypoint configuration, and press finish it seem waypoint set attitude successfully but loadWaypoint failed.
o loadWaypoint failed The execution could not be executed
FYI: The demo app can connect with the drone and correctly show actual position of drone or also correctly show simulation position but I can not loadWaypoint and upload the information to the drone so I cannot test waypoint simulator demo project.
Thank you.
java.lang.ClassNotFoundException: Didn't find class "dji.common.mission.waypoint.WaypointMissionFinishedAction" on path: DexPathList[[zip file "/data/app/~~3wZC6iAXS8vFbcn4GnT_0Q==/com.example.drone3-cEmhgSmPlIHxdqp9tI3sMw==/base.apk"],nativeLibraryDirectories=[/data/app/~~3wZC6iAXS8vFbcn4GnT_0Q==/com.example.drone3-cEmhgSmPlIHxdqp9tI3sMw==/lib/x86, /data/app/~~3wZC6iAXS8vFbcn4GnT_0Q==/com.example.drone3-cEmhgSmPlIHxdqp9tI3sMw==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
Hi,
I'm having problems with the locate button using the DJI simulator and the GSDemo android app, the drone is connected to my laptop using a USB cable, and my android device is connected to the Spark's wi-fi network.
Whenever I press the locate button the google maps view just takes me to Egypt or the Atlantic ocean. Has anyone ever experienced this issue?
Hello Folks,
I was executing code of waypoint mission given in sample code example i.e.
Waypoint northPoint = new Waypoint(homeLatitude + 10 * GeneralUtils.ONE_METER_OFFSET, homeLongitude, 3f);
Waypoint eastPoint = new Waypoint(homeLatitude, homeLongitude + 10 * GeneralUtils.calcLongitudeOffset(homeLatitude), 3f);
Waypoint southPoint = new Waypoint(homeLatitude - 10* GeneralUtils.ONE_METER_OFFSET, homeLongitude, 3f);
Waypoint westPoint = new Waypoint(homeLatitude, homeLongitude - 10* GeneralUtils.calcLongitudeOffset(homeLatitude), 3f);
Why did my drone crash on wall? Is drone sensors not working when we are trying sample app?
Please help us to fix this issue.
Hello,
I was wondering if there is a way to send custom coordinates to the DJI Phantom 3 Advanced drone to reach those coordinates as an end point!
Thank you
Hi ;
I have this 2 problems when i try to complie the GSDemo app with android studio 3.5.
Certainly its a Gradle issue.
Aircraft : Matrice100
INFO: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
Affected Modules: app
INFO: DSL element 'DexOptions.incremental' is obsolete and will be removed soon.
Affected Modules: app
Using Lenovo TAB 2 A7-30HC (Android 4.4.2) app often crashes when I try to prepare the mission. But it works well when using Sony Xperia M2 Aqua (Android 5.1.1). What is the reason?
Isn't available for spark, right ?
How can i do similar things with "SPARK" ?
THanks
I downloaded the zip of this project, as I was facing a similar issue when I followed though the entire tutorial, GSDemo. So I downloaded this project's zip extracted it and ran it on Android Studio 3.0.1
After generating the API key and adding the same in the Manifest, I ran the application on Moto G5S Plus (Android 7.1.1 API level - 25) , when I ran it the app immediately crashed and nothing appeared, the error in Logcat is shown below as an Image, I got a similar error when I followed the tutorial step-by-step.
I wish to test this app with my Phantom 4. Kindly help me with this asap, As it has already got quite late for me to resolve this issue, thank you.
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.